problems for mapping assets folder #5174
Replies: 1 comment
-
|
The reason is that in a production deployment, the frontend is likely a static HTML export running on a different host than the backend(s). Reflex provides the following API [1]:
The naming might be a bit confusing, because these APIs were initially designed to handle uploaded files, however they can and should be used for any generated content that should be made available to the user. Keep in mind that the upload folder is publicly accessible, so if you are generating private content there, you should use an obscured URL that can't be easily guessed. The alternative would be to create your own |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a small project—a web app built with Reflex that generates a certificate in PDF format and saves it in the assets folder. It should be downloadable via a download link, but it's not working. I’ve verified that the PDF file is indeed generated and saved in the assets folder, but the link shows a 404 error. It turns out that the file only becomes available after I restart the app using reflex run. Is there a way to map the assets folder as soon as the PDF is created so that it becomes available? I asked an AI and the issue seems to be that the folder isn’t being re-mapped after the PDF is generated, so the resource (in this case, the PDF) doesn’t appear as available.
Beta Was this translation helpful? Give feedback.
All reactions