openspeedtest / Speed-Test

SpeedTest by OpenSpeedTestâ„¢ is a Free and Open-Source HTML5 Network Performance Estimation Tool Written in Vanilla Javascript and only uses built-in Web APIs like XMLHttpRequest (XHR), HTML, CSS, JS, & SVG. No Third-Party frameworks or libraries are Required. Started in 2011 and moved to OpenSpeedTest.com dedicated Project/Domain Name in 2013.
https://openspeedtest.com
MIT License
2.28k stars 221 forks source link

[Feature Request]Could you please reduce the file size of the "download" file so that we can deploy it on Cloudflare pages? #92

Open egg1234 opened 1 year ago

egg1234 commented 1 year ago

Could you please reduce the file size of the "download" file so that we can deploy it on Cloudflare pages? Because the pages are limited to a file size of 25MB.

Thank you so much!

openspeedtest commented 1 year ago

You can change the file size to 20 or 25 MB. Go ahead.

openspeedtest commented 1 year ago

dd if=/dev/urandom of=file.txt bs=1048576 count=30

https://stackoverflow.com/questions/9185289/uncompressable-data-sequence

https://skorks.com/2010/03/how-to-quickly-generate-a-large-file-on-the-command-line-with-linux/

Try to zip and RAR, and make sure it's not getting compressed.

openspeedtest commented 1 year ago

downloading.txt remove the file extension and replace the original file. Can Cloudflare pages handle POST requests? Can you provide a setup guide?

egg1234 commented 1 year ago

@openspeedtest Thank you for your help! I forked this project to my repo and replaced the original "downloading" file with your "downloading.txt", and then deployed to cloudflare pages. It works perfectly.

The setup guide will be easy. Just click the "Code" button on the edited project(make sure the "downloading" flie is less 25MB). You should download the zip file to your own computer and unzip it. After that you can go to the cloudflare website click on the left menu "Workers & Pages", next you need to click on the "Creat application". You need to select the "Pages" tab, and then click the "Upload assects" button, in the popup menu you can creat your project name, also this name will be the subdomain for pages.dev . After that you can click the "Upload directory" button to upload your unzipped project directory from your own computer. After the upload is finished, you can click the "Deploy site" button and your website will be online immediately.

Of course, you can also connect directly to Github in the upload step, as Cloudflare, like other serverless providers, has a way to install an application into your Github account. Cloudflare will clone your project into pages.

Cheers!