Page not displaying?

I uploaded a simple html and css. But when I click the deployment, it shows default demo page?
No description
62 Replies
Chaika
Chaika•7mo ago
Index shouldn't be capitalized, Pages may be upset about that, what's the deployment url?
Mercy
Mercy•7mo ago
test-dgj.pages.dev ill change index and try..
Chaika
Chaika•7mo ago
yea for me that works If I go to Index directly
No description
Mercy
Mercy•7mo ago
oh..i tried with "index" but dind't work but works with "Index" didn't know capitalization mattered in URL... might be a dumb question...but is there a way to make it "index" a default home page? instead of typing index at the end?
Chaika
Chaika•7mo ago
it should be index.html and that will be the "default"
Mercy
Mercy•7mo ago
😢
No description
Chaika
Chaika•7mo ago
You created a new pages project? You could just make a new deployment
Mercy
Mercy•7mo ago
oh..i deleted and uploaded a new one
Chaika
Chaika•7mo ago
Did you rename it to index.html ?
Mercy
Mercy•7mo ago
yes
Mercy
Mercy•7mo ago
No description
Chaika
Chaika•7mo ago
Interesting.. it's confused about its content type works fine locally I assume? What do the assets uploaded for that look like?
Mercy
Mercy•7mo ago
works fine local
No description
Chaika
Chaika•7mo ago
Did you just delete that project too? lol I would guess for some reason the direct upload doesn't think that's html, either it's not valid or something else
Mercy
Mercy•7mo ago
no that project is still there: testing-1ji.pages.dev oh..not valid?
Mercy
Mercy•7mo ago
No description
Chaika
Chaika•7mo ago
opps I was misspelling it If you click on the project, you get to the deployments screen. You can click "create new deployment" and drag and drop again
Mercy
Mercy•7mo ago
did it again..but still same...
No description
Chaika
Chaika•7mo ago
The reason why that's happening is because CF serves headers for nosniff/telling the browser not to guess the content-type, unlike it will with local files, and Pages is also not serving a content-type, so the Browser is just falling back to text curious though, I've never looked into how Pages determines content types before, I assumed it was entirely just off extensions, 1 sec hmm I can't repro, works fine if I upload either folder or zip with those files: https://513e28a8.quick-test-new.pages.dev/ Are you selecting a folder or zip uploading?
Mercy
Mercy•7mo ago
folder so..it works when you upload it? thats strange..
Chaika
Chaika•7mo ago
Not sure if it matters or not, but are you on Windows using a supported browser like Firefox/Chrome?
Mercy
Mercy•7mo ago
No description
Chaika
Chaika•7mo ago
Pages takes the assets you first upload and uploads them along with the content types it guesses for them I would try zipping and uploading the zip in a brand new project
Mercy
Mercy•7mo ago
ok ill try that
Chaika
Chaika•7mo ago
or you could install the Wrangler CLI and npx wrangler pages deploy (https://developers.cloudflare.com/workers/wrangler/commands/#deploy-1), that's more involved though, although I'd wager that has a better chance of working since it has its own logic for all of this and is more inline with how Git based projects are built
Mercy
Mercy•7mo ago
testzip.pages.dev looks blank to me..
Chaika
Chaika•7mo ago
guessing you zipped using some utility which put everything under a folder? what does the uploaded files look like?
Mercy
Mercy•7mo ago
No description
Chaika
Chaika•7mo ago
yea it's all under test https://testzip.pages.dev/test/
Mercy
Mercy•7mo ago
oh is it because foldername is test? any way to remove "test" at the end....?
Chaika
Chaika•7mo ago
I think Windows just does that. If you try a normal folder deployment now, any luck?
Mercy
Mercy•7mo ago
still displays html text 😢
Chaika
Chaika•7mo ago
I mean one for that existing project, not a new one
Mercy
Mercy•7mo ago
James
James•7mo ago
There’s a longstanding rare issue when uploading with Firefox and the content type gets messed up. I’d recommend testing with another browser just to rule that out.
Mercy
Mercy•7mo ago
oh ok, ill try with chrome
Chaika
Chaika•7mo ago
funny because I tested and it worked fine for me via Firefox lol. Thanks for pointing that out, super strange I meant for the testzip one
James
James•7mo ago
Yeahhh it’s a very weird one that’s been there for years. No one has been able to reliably reproduce but I see it every so often
Mercy
Mercy•7mo ago
i guess im lucky
Chaika
Chaika•7mo ago
That still looks like the zip deploy and not a folder one, everything's still working under /Test/ If you have no aversion to using a Github Repo, Pages is much better that way and wouldn't suffer this issue lol
Mercy
Mercy•7mo ago
oh ok. i don't have github setup but ill try that...might take a day or two though
Chaika
Chaika•7mo ago
If you just want to get it up quick I'd follow James advice, and create a new project via Chrome and folder upload with any luck that'll be the right combo lol
Mercy
Mercy•7mo ago
oh yeah chrome uploaded from chrome: test2-3td.pages.dev
Chaika
Chaika•7mo ago
my god it works
Mercy
Mercy•7mo ago
oh still blank for me
No description
Chaika
Chaika•7mo ago
just dns cache
Mercy
Mercy•7mo ago
nvm it works cloudflare hates firefox i guess
James
James•7mo ago
If you can ever find a reliable reproduction for this, pages team will love you haha
Chaika
Chaika•7mo ago
well it took a bit but we got there lol, thanks for your patience. I hadn't seen that before. but yea, for the best experience Github or Gitlab with Pages built in CI/CD is recommended. Automatic builds and nice stuff
James
James•7mo ago
Glad it’s working for you now Mercy!
Mercy
Mercy•7mo ago
thanks. everyone
Chaika
Chaika•7mo ago
lol I downloaded the exact files and uploaded them as a folder in the same Firefox version he's using, not sure what else is diff
Mercy
Mercy•7mo ago
maybe addon? i use ad blocker
James
James•7mo ago
It’s a wild one. The client doesn’t do the mime type computing - that’s purely on the server based on file extension, but we’ve only ever seen it happen on Firefox, and mostly windows if I recall No rational explanation 😅
Chaika
Chaika•7mo ago
Are you sure it doesn't? The client calls an upload endpoint with all of the content types
Chaika
Chaika•7mo ago
No description
James
James•7mo ago
I was sure… but apparently very wrong. Wow okay that makes so much more sense
Chaika
Chaika•7mo ago
I noticed too it only does it on the first upload of each unique file it seems, so my silly idea was to get them right via zip and then folder upload but I guess that idea failed because the automatic root detection stuff is weird
James
James•7mo ago
Very interesting 🤔 Now I’m very intrigued as to where this is failing in Firefox so randomly. I’ve never seen that req before, dang, good catch
Mercy
Mercy•7mo ago
early Christmas present
danilotallaric
danilotallaric•6mo ago
What should I put in the worker.js file to make my html site work?
Want results from more Discord servers?
Add your server
More Posts
CloudFlare Pages Pointing to Domain from Different Accountif I am hosting Nextjs App in my CloudFlare Account, then can I able to point to the Domain which isEmail Routing API (Email Verification)Hi there, I am a Devolper and I am integerating Cloudflare Email Routing API into my App by this : Serving TB of data from Google Cloud Storage (GCS)Hello all, We are serving TB of data per day from GCS (ML checkpoints, 2 GB to 10 GB per file). EgCan't access worker "route" from inside SvelteKit worker functionI have a worker that uploads images to R2, and I call it via a fetch via an API route in my SvelteKiHow to set KV environment variables in the dashboard?I'm trying to use a Cloudflare Pages worker which I have stored in the functions folder of my Pages Using cache put and match in the same workerHello, As the title says, I want to cache something and verify it's there. This works just fine in Token Permission for Variants APIHello! Does anybody happen to know the permission needed for a token to use the /v4/zones/:zone_id/Any way to abort a chunked HTTP response such that the receiving end knows an error occurred?Hi all! When streaming an unknown-length response to the client, calling `WritableStream.abort()` wiHow do I define the KV_NAMESPACE?I cannot get my KV_NAMESPACE to work in the worker. I'm following the. tutorial but keep getting er[SaaS] Get proxied request size in bytesHello! I intent to use Cloudflare workers as some kind of a proxy backend in my proxy SaaS, i.e. ser