ruby - Unzip a file an upload all its content to S3 using Rails on Heroku -
i building api in rails, , 1 of calls zip file containing static html site, upload s3, , return public url.
what's best way approach this? i'm thinking of unzipping file in heroku's tmp directory , using s3_uploader upload content on s3.
is worth using carrierwave?
nobody answered, i'll explain how approached issue.
i'm using carrierwave upload zip file s3, , i'm calling unzip method asynchronously delayed_job gem. pretty explained on heroku's dev center page.
the unzip method downloads , extracts s3 zip file on heroku's tmp folder, uploads s3 using s3_uploader gem. works quite nicely, thing have sort out @ point deleting unzipped folder when model entity gets deleted.
Comments
Post a Comment