spree-contrib / spree_digital

A Spree extension to enable downloadable products
http://spreecommerce.org
MIT License
117 stars 97 forks source link

Added s3 support. Fixes #1 #47

Closed Grantismo closed 11 years ago

Grantismo commented 11 years ago

Adds s3 storage for digital goods.

Files are uploaded to s3 as private and are still mediated via the digitals controller. For s3 downloads, the digitals controller redirects the user to an expiring download link. Added a new preference Spree::DigitalConfiguration[:s3_expiration_seconds] which determines the expiration time of the s3 download link. Added an "attachment" content disposition to the s3 header so goods are downloaded rather than displayed, although this might need to be a preference.

I also updated some of the 2-0-stable overrides which weren't properly updated for Spree 2.0 Unfortunately, I've only tested against 2-0-stable and haven't added any test coverage yet.

petergoldstein commented 11 years ago

@Grantismo This is a complex enough feature that I'd really want some test coverage. I'm reluctant to merge sans specs. Is that something you can add to this PR?

Thanks for the contribution!

JDutil commented 11 years ago

Yay I was going to do this once I had some spare time thanks!

One issue though @Grantismo is that your sending the pr to 2-0-stable which is incorrect this has some rails 4 spree 2-1-stable code in it such as the permitted params.

I'll let @petergoldstein review this though since he is up to date with latest version.

Grantismo commented 11 years ago

@petergoldstein I'll hopefully complete some test coverage by the end of the night. I'm porting digitals_controller specs from master which aren't currently included in 2-0-stable as well.

JDutil commented 11 years ago

@Grantismo @petergoldstein anything left to do for this?

Grantismo commented 11 years ago

@jdutil all good on my front.

petergoldstein commented 11 years ago

@jdutil I think it's ready to merge

JDutil commented 11 years ago

Thanks this has been merged.