rejetto / hfs

HFS is a web file server to run on your computer. Share folders or even a single file thanks to the virtual file system.
GNU General Public License v3.0
2.29k stars 227 forks source link

Cloudflare upload file size 100mb #740

Closed SN4RK closed 1 month ago

SN4RK commented 2 months ago

Is your feature request related to a problem? Please describe. Hello! I faced a problem in the form of limiting the maximum weight of the downloaded file at a time when using the Cloudflare service. This is a 100 MB limit set by Cloudflare itself.

Describe the solution you'd like Chunking an uploaded file weighing more than 100 MB into several parts.

Describe alternatives you've considered The ability to delete the "Content-Length" when sending a file.

Additional context For some reason, I have not encountered this problem before. I quietly downloaded files of 5 GB each. Everything changed after the provider was changed. I understand that it does not relate to the topic in any way, but please tell me, can this affect? Let's say the provider filtered/modified http requests, removing the same "Content-Length".

rejetto commented 2 months ago

When you try to upload, does it fail immediately?

rejetto commented 2 months ago

i tried removing the content-length from the request: it's not possible because the browser doesn't allow that.

SN4RK commented 2 months ago

When you try to upload, does it fail immediately?

No. Only after 100% of the download writes a file that is too large. When downloading not via reverse proxy, everything works. I have no idea how I used to upload files over 100 MB. Most likely, I caught a bug. The issue of automatically dividing the downloaded file by 100 MB remains open. :)

SN4RK commented 2 months ago

I'm sorry, I'm not good at this, but maybe it will help somehow? https://www.dailyithelp.com/hacking-cloudflare-100mb-upload-limit/

rejetto commented 2 months ago

When you try to upload, does it fail immediately?

No. Only after 100% of the download writes a file that is too large. When downloading not via reverse proxy, everything works. I have no idea how I used to upload files over 100 MB. Most likely, I caught a bug. The issue of automatically dividing the downloaded file by 100 MB remains open. :)

you wrote download 3 times, but weren't we talking about uploads? i'm confused

rejetto commented 2 months ago

I'm sorry, I'm not good at this, but maybe it will help somehow? https://www.dailyithelp.com/hacking-cloudflare-100mb-upload-limit/

while removing content-length is possible in the general case, it's not allowed by the browser, at least if you use XMLHttpRequest, as i'm doing, because that's the only way to track the progress of the upload. So, i basically can't use the technique.

SN4RK commented 2 months ago

When you try to upload, does it fail immediately?

No. Only after 100% of the download writes a file that is too large. When downloading not via reverse proxy, everything works. I have no idea how I used to upload files over 100 MB. Most likely, I caught a bug. The issue of automatically dividing the downloaded file by 100 MB remains open. :)

you wrote download 3 times, but weren't we talking about uploads? i'm confused

I apologize. I use a translator. Cloudflare has a upload limit. That is, there is a problem with uploading files to the server. After 100% upload of the file, it writes "too large". I suggest splitting the uploads file into several parts of 100 MiB each, bypassing the restriction.

rejetto commented 1 month ago

I made it :) A friend with CF tested it.

rejetto commented 1 month ago

running with npx? and what operating system?

SN4RK commented 1 month ago

running with npx? and what operating system?

The server is running windows 10. HFS for windows operating system. There is an nginx proxy manager in the Docker desktop container.

SN4RK commented 1 month ago

I made it :) A friend with CF tested it.

Great news :D

rejetto commented 1 month ago

available in 0.54.0-alpha2