Download Meteor Amazon S3 thumbnail image

I use Meteor and would like to create a form with an image upload field that saves the downloaded file into the Amazon S3 bucket in its original size, as well as several sizes of thumbnails defined (transmitted) through the code.

So far, I am using lepozepo: s3 package , which works fine, but doesn't seem to allow me to create additional sketches.

Given that I can upload source files to S3, I’m considering viewing a service on Amazon that can generate the thumbnails you need and then notify my Meteor app. But I'm not sure how to achieve this.

Can someone point me in the right direction or talk about a better approach for this?

PS: I want to avoid using Filepicker.io.

+5
source share
4 answers

I seem to be following the wrong path. CollectionFS has everything I need and much more. I now have a job with more opportunities to do more later. This is one brilliant collection of packages with clear guides on their respective Github pages.

Here are the packages I hit:

Code Example →

+2
source

CollectionFS is now deprecated, but there are other options:

Use jQuery-File-Upload (this is great), it generates thumbs, has size and format check, etc. Using mainly these two packages together:

https://atmospherejs.com/tomi/upload-jquery

https://atmospherejs.com/tomi/upload-server

You can use another package to integrate S3.

Like: https://github.com/peerlibrary/meteor-aws-sdk/


Good, but if you need to create thumbs, for example, you will need to integrate with another package or do it yourself. I have not tested, but received this offer: https://github.com/jamgold/cropuploader


Rich documentation and well that offers: Download images.


Use this adaptation in the best way for your needs.

+1
source

look at downloading the jquery blueimp file to resize the client and graphics servers. On the client, you have slightly limited quality options, on the server you can use the full power of imagemagick. Or look at my blog post http://doctorllama.wordpress.com for uploading files for the meteor in general.

0
source

cfs: gridfs - for some reason, not sure why

The meteor uses gridfs to store fragments of files inside the mongo database. In the case of s3, it is intended for temporary storage.

0
source

Source: https://habr.com/ru/post/1206477/


All Articles