R2 Most PDF files showing source from browser

For Workers & Pages, what is the name of the domain?

N/A

What is the issue or error you’re encountering

Cannot render R2 PDF

What steps have you taken to resolve the issue?

Reuploading

What are the steps to reproduce the issue?

Upload a PDF to a public R2 bucket and open the file through the browser. I have one PDF file that does work but the rest do not. All my images are fine.

Screenshot of the error

Cloudflare responds with content-type: application/pdf for the working pdf files and content-type: text/html for the problematic pdf files.

May I ask what kind of language code and encoding is in use that Cloudflare somehow doesn’t process it correctly? :thinking:

Are they signed with a digital certificate as well?

How lare are those PDF files?

Could you share the example URL to the particular resource?

Are you able to download it somehow?

Does re-uploading help or not?

Thanks for responding fritex.

May I ask what kind of language code and encoding is in use that Cloudflare somehow doesn’t process it correctly?

I am using cloudflare together with Laravel Cloud (using filamentphp).

Are you able to download it somehow?

When I download the file, I noticed that .html is being appended (on mobile). So within filezilla I can see it understands that the file is pdf but when downloading it has filename.pdf.html

Does re-uploading help or not?

Unfortunately not.

This topic was automatically closed after 15 days. New replies are no longer allowed.