Hello everyone,
I’m encountering an issue with accessing PDF files generated in Google Cloud Storage from my FlutterFlow application.
Context:
I am using a Cloud Function to generate PDF files and upload them to a Google Cloud Storage bucket.
After the PDF is created, I make it public using
blob.make_public()
.I have confirmed that the file is accessible by using the URL in a browser, where it displays correctly.
Even if the file is created by another process, a long time ago, I face the same issue
Problem:
However, when I try to access the PDF URL via a "Launch URL" widget in FlutterFlow, I receive the following error :
This XML file does not appear to have any style information associated with it. The document tree is shown below. <Error> <Code>AccessDenied</Code> <Message>Access denied.</Message> <Details>Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object. Permission 'storage.objects.get' denied on resource (or it may not exist).</Details> </Error>
Additional Details:
The file displays correctly if I refresh the page or access the URL directly in the browser.
The URL I’m using is exactly the one provided after the upload, and it is well-formatted.
Questions:
Has anyone encountered this issue and have suggestions for resolving it?
Are there any specific settings in FlutterFlow that I should check regarding access to public URLs?
Thank you in advance for your help!