I would like to have the ability to upload files programically. Perhaps via ajax, returning the fileid of the file(s) uploaded. If multiple file upload, please return a fileid and filename structure.
Thanks,
Jim
I would like to have the ability to upload files programically. Perhaps via ajax, returning the fileid of the file(s) uploaded. If multiple file upload, please return a fileid and filename structure.
Thanks,
Jim
Uploading files via the API would be a greatly desired feature for us. We have multiple files that need to be distributed to a group of students and manual point and click is not a reasonable option.
I added an uploadFile task to the API (support.populiweb.com/entries/20218516-API-Reference#uploadFile). The task uploads a file to a specified person (will display on Profile > Activity Feed) or you can pass in the custom_field_id parameter and it will upload a file to the specified person's custom field.
If you are using a variation of our API Sample Code you can do something like this to get your file to upload via the API:
$populi = new Populi();
$populi->login(YOUR_USERNAME, YOUR_PASSWORD);
$file_location = "/home/my_file.pdf";
echo htmlentities($populi->doTask('uploadFile', array('person_id' => 1111, 'file' => '@' . $file_location, 'custom_field_id' => 2222), true));
Thanks!
Christian