I am using slingshot to upload some images in my Amazon s3 and it works like charm. Nevertheless, I want to use slingshot to upload some files (text,doc,odf etc) too in my Amazon s3. BUT, I want to convert all these files into PDF first before uploading into s3. I am familiar with nodeJs package like "https://github.com/gfloyd/node-unoconv", that converts file into PDF. But how would i be able to integrate it into slingshot.
Eventually all the text, doc, etc files, that the client uploads, I want them to be stored in S3 but in PDF format. So is there any way to do that.
Amateur in meteor, so would be grateful if the explanation is detailed.
Thanks.
Slingshot is uploading directly to S3 so I am not sure how you would efficiently convert the files before the upload. You could do it client side, but this is obviously not 100% reliable and can be heavy for the client.
For a recent application I used Amazon Lambda in order to do images resizing as soon as they are uploaded to an S3 bucket.
It is very easy to use. You just have to create a package with your code and upload it to Lambda and then trigger the Lambda function when a file is uploaded to S3.
The service is really cheap and the tutorial is easy to follow. It is about file resizing but it should be easy to modify in order to do PDF conversion as you can use any npm package. There is a lot of steps involved: create S3 buckets, create IAM roles, create a Lambda function, etc. But as soon as it is configured it is quite reliable.
I think it is the best tools to pair with S3 especially when you are uploading directly to buckets.