
-
Look at https://uppy.io/ open source and lot of integrations. You can keep moving to different levels of abstraction as required and see some good practices of how things are done.
-
Nutrient
Nutrient – The #1 PDF SDK Library, trusted by 10K+ developers. Other PDF SDKs promise a lot - then break. Laggy scrolling, poor mobile UX, tons of bugs, and lack of support cost you endless frustrations. Nutrient’s SDK handles billion-page workloads - so you don’t have to debug PDFs. Used by ~1 billion end users in more than 150 different countries.
-
-
In my project[1], I convert all user-uploaded images to high-quality webp and store them like that. I discard the original files after the conversion. I use imgproxy[2] to further resize and convert them on the fly for actual display.
I don't do videos yet, but I'm kinda terrified of the idea of putting user-uploaded files through ffmpeg if/when I'll support them.
[1] https://github.com/grishka/Smithereen
[2] https://github.com/imgproxy/imgproxy
-
In my project[1], I convert all user-uploaded images to high-quality webp and store them like that. I discard the original files after the conversion. I use imgproxy[2] to further resize and convert them on the fly for actual display.
I don't do videos yet, but I'm kinda terrified of the idea of putting user-uploaded files through ffmpeg if/when I'll support them.
[1] https://github.com/grishka/Smithereen
[2] https://github.com/imgproxy/imgproxy
-
Read through the comments and was surprised no one mentioned libvips - https://github.com/libvips/libvips. At my current small company we were trying to allow image uploads and started with imagemagick but certain images took too long to process and we were looking for faster alternatives. It's a great tool with minimum overhead. For video thumbnails, we use ffmpeg which is really heavy. We off-load video thumbnail generation to a queue. We've had great luck with these tools.
-
I have used https://github.com/cshum/imagor infront of S3 before and liked it, there is many (some commercial) offerings for this
-
We map the TUS[0] protocol to S3 multipart upload operations. This lets us obscure the S3 bucket from the client. The TUS operations are handled by a dedicated micro-service. It could be done in a Lambda or anything.
Once the upload completes we kick off a workflow to virus scan, unzip, decrypt, and process the file depending on what it is.
For virus scanning, we started with ClamAV[1], but eventually bought a Trend Micro product[2] for reasons that probably don't apply to you. It is serverless based on SQS, Lambda, and SNS. Works fine.
Once scanned, we do a number of things. For images that you are going to serve back out, you for sure want to re-encode those and strip metadata. I haven't worked directly on that part.
[0] https://tus.io/
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
+1 to vips! It's amazingly fast and stable. I even wrote (some minimal) Swift bindings for it to be used with a Swift backend: https://github.com/gh123man/SwiftVips
-
Slight OT...
I created a program for profile pictures. It uses face recognition technology as to not deform faces when resizing photos. This may be useful to you.
https://github.com/jftuga/photo_id_resizer
-