Search The ForumSearch   RegisterRegister  LoginLogin

AfterLogic Aurora Files

 AfterLogic Forum : AfterLogic Aurora Files
Subject Topic: Using curl to upload a file Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
bnoeafk
Newbie
Newbie
Avatar

Joined: 23 February 2022
Location: United States
Online Status: Offline
Posts: 9
Posted: 24 February 2022 at 8:29am | IP Logged Quote bnoeafk

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 View bnoeafk's Profile Search for other posts by bnoeafk
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6038
Posted: 24 February 2022 at 11:25pm | IP Logged Quote Igor

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 View Igor's Profile Search for other posts by Igor
 
Igor
AfterLogic Support
AfterLogic Support


Joined: 24 June 2008
Location: United States
Online Status: Offline
Posts: 6038
Posted: 25 February 2022 at 1:58am | IP Logged Quote Igor

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 View Igor's Profile Search for other posts by Igor
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide