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

Best Practices for Storing Images in SCS Sessions? #220

Open
SennaSanzo opened this issue Oct 1, 2024 · 0 comments
Open

Best Practices for Storing Images in SCS Sessions? #220

SennaSanzo opened this issue Oct 1, 2024 · 0 comments

Comments

@SennaSanzo
Copy link

Hi everyone!

I'm currently developing a SaaS application using Go and the SCS package for session management, with PostgreSQL as the session store. I developped multi-step forms in the app and in one of them, users can upload images in an intermediary step. Between each step a post is made with the server to store data related to the current step in the session.

I'm considering storing these images directly in the session data managed by SCS (as byte arrays). Given that SCS stores session data in PostgreSQL, I'm wondering:

  • Is it a good idea to store images in SCS sessions when using a database-backed session store?

  • Are there any performance implications or potential pitfalls I should be aware of?

  • Would you recommend this approach, or is it generally discouraged to store large data like images in sessions?

I'd love to hear your thoughts, experiences, or any best practices you might suggest!

Thanks in advance for your help, and happy coding! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant