SuffolkLITLab / docassemble-MotionToStayEviction

A Docassemble interview for the Massachusetts Appeals Court Motion to Stay Eviction
https://www.courtformsonline.org/appeals/#stayeviction
MIT License
0 stars 0 forks source link

Bonus: attempt to reduce file size of uploads if too big #53

Open BryceStevenWilley opened 1 year ago

BryceStevenWilley commented 1 year ago

On JPG or PDF uploads, try to reduce the file size if too big.

Technically might be possible with JPGs, just lower the JPG quality a bit. If it's > twice the limit, shouldn't try to.

For PDFs, not sure how to go about shrinking it, probably shouldn't try.

Could also try to attach one version of the document, but still link out to a larger version of the doc? Not sure how that would for "what goes on the court's record". Would need to be very careful handling the things and making sure we don't make things not-visible.

nonprofittechy commented 1 year ago

There are some techniques to reduce pdf filesize we're already doing in one of the appeals court repos, I can try to dig up some example code if you haven't seen it already.