shrine-cloudinary icon indicating copy to clipboard operation
shrine-cloudinary copied to clipboard

Large files presign upload

Open jaahoo opened this issue 4 years ago • 2 comments

Hi, I am using Uppy AWS S3 for direct upload. I can easily upload files smaller than 100 MB but larger files immediately crash with: "Access to XMLHttpRequest at 'https://api.cloudinary.com/v1_1/CLOUD_NAME/video/upload' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource."

jaahoo avatar Mar 18 '20 15:03 jaahoo

I'm guessing that 100MB is Cloudinary's limit for simple uploads (single request), and from then onward it requires special multipart uploads. I know that Cloudinary has special endpoint(s) for large uploads, but I don't know how to correctly do direct uploads to them. I'm not sure if this strategy is compatible with Shrine's presign endpoint, as it is intended for single upload request, and I think Cloudinary's large file support might require multiple.

You could investigate how Cloudinary's official upload widget is handling large files, and maybe that could tell us what is the specific problem and whether we can solve it.

janko avatar Mar 18 '20 15:03 janko

If you're on the free plan, Cloudinary limits you to 10MB image uploads and 100MB video uploads. I think that's what you're hitting; although the multipart explanation might hold true, too.

petrbela avatar Jun 21 '20 16:06 petrbela