upload of 9 byte file failing

using the rest api to upload via curl. it shows the 'uploading' messages for many many minutes and then fails..
No description
1 Reply
fulcrum
fulcrumOP4mo ago
here is the code used to do the upload:
# Upload to uploadthing.com
RESPONSE=$(curl -s https://api.uploadthing.com/v6/uploadFiles \
--request POST \
--header "X-Uploadthing-Api-Key: $UPLOADTHING_API_KEY" \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"files": [
{
"name": "$FILE_NAME",
"size": $FILE_SIZE,
"type": "$MIME_TYPE",
"customId": null
}
],
"acl": "public-read",
"metadata": null,
"contentDisposition": "inline"
}
EOF
)
# Upload to uploadthing.com
RESPONSE=$(curl -s https://api.uploadthing.com/v6/uploadFiles \
--request POST \
--header "X-Uploadthing-Api-Key: $UPLOADTHING_API_KEY" \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"files": [
{
"name": "$FILE_NAME",
"size": $FILE_SIZE,
"type": "$MIME_TYPE",
"customId": null
}
],
"acl": "public-read",
"metadata": null,
"contentDisposition": "inline"
}
EOF
)

Did you find this page helpful?