codeforpdx / PASS

PASS project - with HMIS module integration
MIT License
25 stars 24 forks source link

Limit size of file upload for profile photo #469

Closed ogorman89 closed 8 months ago

ogorman89 commented 8 months ago

This PR:

Resolves #289

1. Limits profile photo file size to 1MB 2. Shows an error in bottom left if the photo size is greater than 1MB

Screenshots (if applicable):

https://github.com/codeforpdx/PASS/assets/3335277/69b8a420-5658-4e60-b257-8c8889acbdcf

Additional Context (optional):

Just a limit for the small avatar image, so that it is no longer unconstrained.

Future Steps/PRs Needed to Finish This Work (optional):

We may want to revisit and adjust the profile photo file size requirement during user testing.

Issues needing discussion/feedback (optional):

None for this PR, but there are a couple of items mentioned in issue #289 worth future discussions:

1. See @timbot1789 notes on limiting document uploads with an environment variable configurable by the hosting org. 2. Similarly, we might consider a configurable total pod size constraint so that the total storage size of a pod is limited so that dimension is not unconstrained. This is more of a concern for the pod hosting organization whoever that ends up being.

andycwilliams commented 8 months ago

I agree with the future steps needed but we need more user testing and that may not be for a while. So this is good to go and gives us a good basis to work with.