In Widget v3.12.0+ it’s possible to enable a debug mode. When enabled, the widget will display the actual reason why the upload has failed:
To enable the debugging mode, you can use one of the following options:
- The UPLOADCARE_DEBUG_UPLOADS global variable
<script>
UPLOADCARE_DEBUG_UPLOADS = true;`
</script>
- Widget data attribute
data-debug-uploads
<input type="hidden" role="uploadcare-uploader" name="file-upload" data-debug-uploads />
- Settings object key
debugUploads
const dialog = uploadcare.openDialog(null, {
debugUploads: true
});
We strongly advise using the latest version of the widget, but if you can’t upgrade for some reason, and your current version is <3.12.0, follow these steps to debug the error:
Let’s find the cause of the message. We will give you a list of things to check in order to avoid common mistakes our users make:
-
Free plan requires account verification before uploading non-image files. Images include the following extensions:
BMP, GIF, JPEG, PNG, PCX, TIFF, TGA, WEBP, MPO
. If you are uploading any other file type you will need to attach payment information to your account. -
Free plan has hard limits on uploads and storage - you can see your remaining upload units and other limits in your dashboard. Once you hit the limit, your uploads are paused for the remainder of the current month.
-
Each of our plans has limits on the sizes of the files. Please check that your file is not exceeding the limits.
-
Check if you are able to upload the file using the widget on our main site https://uploadcare.com/. Were you able to do that? If not, what does it say?
-
Check the “Signed uploads” option – if you are not sure what it is, just disable it.
-
Sometimes it is convenient to upload a file through the URL. Check that URL is correct and the file is publicly available - you should be able to open the URL using “Incognito mode” of your browser.
Getting additional information
Open “Developer tools” (Ctrl + Shift + C for Chrome) in your browser and you will find a tab with network activity. Repeat your file upload and find the line:
/upload/base/?jsonerrors=1
click on it and you’ll further see the reason for the disaster:
Report
If you are receiving error messages not covered in this guide you can always check with our support. Your report should be as detailed as possible – your action sequence, information about the file, console messages, any other information that might help us to know more about your setup.