Uploading with a Custom Path
?path=PATH
To upload a file to a custom folder in your bucket, you need to add the query parameter ?path=PATH.
curl --location 'https://api.defaultuploader.com/v1/upload?path=mysite.com' --header 'Authorization: YOUR_SECRET_CLIENT_TOKEN' --form 'file=@"/C:/Users/UserName/Pictures/Saved Pictures/cat.jpg"'
If you upload with the path ?path=mysite.com/cats, your file structure in the bucket will look like this:
Directorybucket/ — root folder of the bucket
Directorymysite.com — custom path
Directorycats — custom path
Directoryimage — file type (image, video, audio, etc.)
Directoryjpg — file extension
- file.jpg — file name