I’m new to Cloudflare so this is probably something obvious that I’ve done wrong…
Currently I host a old static website (circa 2004) at dreamhost. It works fine over there. That URL is tinkerville.cutthatout.com
I’d like to move it over to Cloudflare pages so I can drop the dreamhost account. I created a new project and used “direct upload” to send all my pages up to Cloudflare. 774 Files uploaded successfully.
I went with direct upload because this isn’t already set up in a git and since I don’t ever plan to change or update the code, this seemed like the least complicated approach.
Everything looks like it worked, but when I visit the site tinkerville.pages.dev, the index.html page is rendered as text. If I enter the URL for an image my browser prompts me to select a local location to save the file.
I’m using Firefox on Windows primarily but I have verified the problem occurs in Edge on Windows and in Brave on Android as well.
I’m sure I’ve just failed to configure something properly, but I’m at a loss where to start since even basic image serving doesn’t work.
I solved this issue by deleting the project and making a new one pulling from github. All of the files are identical to what I direct uploaded, but for some reason this worked.
I can only conclude the direct upload feature is broken.
It is the test-site directory that I uploaded to Cloudflare Pages. For reference, the same directory deployed manually to Netlify does work: https://wrkr-direct-upload-test.netlify.app
Aha. I created a new project via Firefox and now have reproduced the bug.
Previously, I had created the project via Safari (worked) and uploaded a new deployment via Firefox (worked). Now I have a project created via Firefox (no content-type) and if I upload a new deployment via Safari, still no content-type (in fact, returning no content at all). https://testsite3.pages.dev
And now I’ve uploaded a new deployment via Safari as a directory rather than a zip file, in the same project, and it works again. weird
Excellent (right?) that you could recreate this @i40west.
I also tried Firefox Nightly (107.0a1) as it has no extensions enabled, with the same result. Not sure when I originally saw this, but perhaps Firefox 103 or earlier.
I’ve still not been able to repro myself… seems to be something Firefox related but it’s weird since it shouldn’t matter at all what browser is used. We do the type stuff server side not client but yeah…
We’re aware of the bug just no idea how it’s caused yet and repro is hard.
I just ran into this issue myself on Firefox 107.0 on macOS Monterey (12.5.1). I created the project in Firefox and then dragged a folder for a direct upload. That led to my index.html page being served as plain text. I then created a zip and uploaded that as a new deployment and had the same issue. I then tried uploading the zip via DuckDuckGo (which is Safari in privacy clothing) and continued to have the same issue. I subsequently deleted the project.
But if I did the entire process via DuckDuckGo (project creation and zip upload), everything works.
The project is python-launcher.pages.dev if there’s some logging you can look into to see what’s going on.
In my previous reply, I didn’t consider Cloudflare’s storage cache. Now I noticed if the file itself is unchanged, the malfunctioned files uploaded from Firefox won’t be updated (then corrected) by re-uploading from Chromium (due to cache mechanism I guess). So my experiment result might be wrong in the previous reply.
BTW, I found one more related problem. If a UTF-8 encoded file is uploaded from Firefox, it will be processed as if it’s a ISO 8859-1 codec file.
In contrast, UTF-8 file uploaded from Chromium will be correctly treated as UTF-8.