I can't upload a file.

What it looks like

In Widget v3.12.0+ it's possible to enable a debugging 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:

1. The UPLOADCARE_DEBUG_UPLOADS global variable

2. Widget data attribute data-debug-uploads

3. Settings object key debugUploads

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.

Typical reasons for the error

Below is a list of things to check in order to avoid common mistakes our users make:

  • Make sure the public key set in your widget settings is correct and doesn't contain extra characters/spaces.
  • Each of our plans has a file size limit. Please check that your file is not exceeding the limit.
  • Check the Signed uploads option in your project settings. If enabled, make sure you're using the correct signature/expiry. If you are not sure what this option for, simply disable it.
  • If you're trying to upload a file from a URL, make sure the URL is correct and the file is publicly available – you should be able to open the URL using your browser.
  • Make sure your subscription is paid and your account is not blocked for non-payment.
  • The free plan requires account verification before uploading non-image files. Images include the following formats: BMP, GIF, JPEG, PNG, PCX, TIFF, TGA, WEBP. If you are uploading any other file type you will need to attach payment information to your account.
  • If you're using the free Community plan, keep in mind that it has hard limits on upload units and storage – you can see your remaining upload units and other limits on your dashboard. Once you hit the limit, your uploads are paused until the start of the next billing cycle.

Getting additional information

Open “Developer tools” in your browser and navigate to the Network tab. Repeat your file upload and find the line:

/upload/base/?jsonerrors=1

Click on it and then click o the Response tab, and you’ll see a response from our upload API that contains the exact reason:

If you receive any error messages not covered in this guide, contact us at  help@uploadcare.com and provide a detailed report – your steps to reproduce the error, information about the file, console messages, any other information that might help us to know more about your setup and environment (operating system, browser, and its version, etc.).
Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.