We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The API request to upload files doesn't seem to be working, it creates the file on ActiveCollab but its size is always 0 bytes.
I am not sure if I am using the request correctly:
API::call( 'projects/1/files/files/upload', null, array( 'file[name]' => 'NAME OF THE FILE', 'file[visibility]' => 1, 'file[category_id]' => 1, 'file[body]' => 'FILE DESCRIPTION', 'file[milestone_id]' => 0, 'file[project_id]' => 1 ), array( '/ABSOLUTE_PATH/file.jpg' ));
Am I doing something wrong?
The text was updated successfully, but these errors were encountered:
Or in other words, what variable is the API expecting for the attachment here:
curl -i -H "Accept: application/json" -H "Content-Type:multipart/form-data" -X POST -F "submitted=submitted" -F "file[name]=NAME_OF_THE_FILE" -F "file[visibility]=1" -F "file[category_id]=1" -F "file[body]=FILE_DESCRIPTION" -F "file[milestone_id]=0" -F "file[project_id]=1" -F "attachment_1=@/ABSOLUTE_PATH/file.jpg;type=application/octet-stream" "http://site.com/activecollab/api.php?path_info=projects/1/files/files/upload&auth_api_token=MY_API_TOKEN"
Thanks
Sorry, something went wrong.
It expects the argument "attachment"
Added a couple commits to fix this here: https://github.com/smoscar/activecollab-sdk/commits/master
No branches or pull requests
The API request to upload files doesn't seem to be working, it creates the file on ActiveCollab but its size is always 0 bytes.
I am not sure if I am using the request correctly:
API::call( 'projects/1/files/files/upload', null, array(
'file[name]' => 'NAME OF THE FILE',
'file[visibility]' => 1,
'file[category_id]' => 1,
'file[body]' => 'FILE DESCRIPTION',
'file[milestone_id]' => 0,
'file[project_id]' => 1
), array(
'/ABSOLUTE_PATH/file.jpg'
));
Am I doing something wrong?
The text was updated successfully, but these errors were encountered: