Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flask File Uploading and app enviroment #8248

Closed
aadejare opened this issue Jan 21, 2024 · 1 comment
Closed

Flask File Uploading and app enviroment #8248

aadejare opened this issue Jan 21, 2024 · 1 comment
Labels
solution:invalid triage Please triage and relabel this issue

Comments

@aadejare
Copy link

Creating a flask application, I have specific folders that the files should upload to. While running the application, it will upload the files, but once the application closes, the files go missing. This mechanism happens when running a Windows program. I looked into the platformdirs and other areas, but they do not address my question.

What method can I use to upload a file into a designated directory in the application and assure that it renders the specific way?

Please see this link to see how Flask uploads files
I also leverage FlaskWebGui to run the Flask program and then Pyinstaller via auto py to exe to create the program.

@aadejare aadejare added the triage Please triage and relabel this issue label Jan 21, 2024
@rokm
Copy link
Member

rokm commented Jan 21, 2024

but once the application closes, the files go missing.

Are you using onefile mode? Because in that case, the application's directory is temporary, and you should not be storing files into it if you want to make them persistent across the runs.

@bwoodsend bwoodsend closed this as not planned Won't fix, can't repro, duplicate, stale Jan 21, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
solution:invalid triage Please triage and relabel this issue
Projects
None yet
Development

No branches or pull requests

3 participants