Sign Up
Loading...

Uploading files via API (curl example)

Asked by troy on August 19, 2025

Can I upload files via the API and what is the required structure? Will a curl command like the example work?


Answered by Twidget

When uploading files with curl use the --form parameter. Example:

curl --location 'http://f343f.twidget.io/files/single' \ --form 'single=@"/OneDrive/Pictures/image.jpg"' \ --form 'path="/folder/file.png"'

This uses multipart/form-data to send the file.

Related Questions