sergix44 / XBackBone

A lightweight file manager with full ShareX support and more
https://xbackbone.app
GNU Affero General Public License v3.0
993 stars 81 forks source link

Cannot upload files larger than 100MB when using Cloudflare #560

Closed SrS2225a closed 7 months ago

SrS2225a commented 8 months ago

System Info

Describe the bug When using cloudflare for your site, when uploading files larger than 100MB, the file will fail to upload (even though XBackBone thinks it was successful), resulting in a http 413 error from cloudflare origin. This is because on the free cloudflare plan, the plan will limit the max file size you can upload in a single request.

To Reproduce Steps to reproduce the behavior:

  1. Go to the upload page
  2. Choose a file and upload
  3. Upon finishing, the file fails to upload

Expected behavior The file gets uploaded to XBackBone, and shows in the home page, but does not. However, this is easy enough to fix by chunking the upload into something like 50MB parts or similar (see related article: https://community.cloudflare.com/t/large-file-upload-issue/493514). I think an option of some kind of toggle to use chunking will be beneficial for those that do need it and those that don't. I will see about adding chunking this weekend if I can. Thanks!

Screenshots Screenshot 2024-01-19 143226

Logs N\A

SrS2225a commented 8 months ago

Yeah, turns out it is way harder than I first initially thought that it would require some breaking changes to the backend, so because of that, I think that someone with more knowledge about this should do it instead :)

rafalohaki commented 8 months ago

uploading via website, it could be fixed with added upload in chunks https://developer.mozilla.org/en-US/docs/Web/API/Blob

normally there is a limit up to 100mb with cloudflare, you can disable it with proxy disabled in cloudflare dns settings

SrS2225a commented 7 months ago

Thanks, I did not know you could disable that by disabling the Cloudflare proxy. That did the trick, thank you