using curl for multipart/form-data with a file upload
For more complex requests:
curl -X POST "YOUR_API_URL" -H "Authorization: Bearer YOUR_TOKEN" -H "Accept: application/json" -H "Content-Type: multipart/form-data" -F "meta={\"YOUR_ATTRIBUTE\": \"YOUR_DATA\"};type=application/json" -F "text=PATH_TO_FILE;type=text/plain"
You can set several chunks together into one request. For more, check out: https://docs.microsoft.com/en-us/azure/digital-twins/how-to-add-blobs!