samedi 26 novembre 2016

Generating preview image thumbnails of uploaded files on Rails

I'm using Rails to create a website that allows users to upload document files with various file formats (pdf, doc, docx, ppt, pptx, xls, xlsx, png, jpg, jpeg) and store them on aws S3. I'm using Carrierwave to directly upload files to S3, and everything works well so far. Uploaded files are nicely stored in S3.

But now, I want to display preview images (thumbnail images) for uploaded files. I've tried several different methods by manipulating Carrierwave configuration, but it seems like generating thumbnail images only works on PDF files, not other file formats. Can anyone please give me any insight to make this work? Thanks

Aucun commentaire:

Enregistrer un commentaire