1

What would be the best place to save files in Symfony? Or is that fully up to the programmer?

To clarify my question. I have some code that produces *.ics files. These files should be saved 'somewhere' for future reference.

1 Answer 1

3

You should use the cache folder for any temporary files you need to save.

For file uploads use the uploads folder

For anything that needs to be saved permanently create your own folder.... just don't put it inside web (or it will be publicly accessible) or in your bundle. If you need the files to be downloadable later you can always fetch and serve them via PHP by setting appropriate headers.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.