Author |
|
bnoeafk Newbie
Joined: 23 February 2022 Location: United States
Online Status: Offline Posts: 9
|
Posted: 24 February 2022 at 8:29am | IP Logged
|
|
|
Does anyone have a working example of how to upload a file, using curl? All my API calls using curl are working without issue and it appears that this is the only one that I'm having problems with (and the online documentation doesn't actually give an example)
I tried posting a new topic on this forum last night, but it seemed to have been lost in the ether...
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6092
|
Posted: 24 February 2022 at 11:25pm | IP Logged
|
|
|
We don't currently have a sample for that purpose, I've asked the developers to provide one, it may take a while, hopefully we can provide it some time next week. Assuming the task can be done via cURL at all, of course.
And I do in fact see your other topic - it's created under Aurora Corporate rather than Aurora Files, though.
--
Regards,
Igor, Afterlogic Support
|
Back to Top |
|
|
Igor AfterLogic Support
Joined: 24 June 2008 Location: United States
Online Status: Offline Posts: 6092
|
Posted: 25 February 2022 at 1:58am | IP Logged
|
|
|
Just heard from the developers, the approach is quite straightforward:
Code:
curl --location --request POST 'https://aurora-files.afterlogic.com/?/Api/' \
--header 'Authorization: Bearer ...' \
--form 'Module="Files"' \
--form 'Method="UploadFile"' \
--form 'Parameters="{\"Type\":\"personal\",\"SubPath\":\"\",\"Path\":\"\",\"Overwrite\":false}"' \
--form 'jua-post-type="ajax"' \
--form 'jua-uploader=@"image.png"' |
|
|
It's assumed that authentication token is sent in Authorization header. The file that's being uploaded (image.png in this example) should be present in the current directory.
We've also updated "Uploading files" section of the respective documentation page.
Hope this helps.
--
Regards,
Igor, Afterlogic Support
|
Back to Top |
|
|