arthrex/resourcify — pull request #17 by dbeard (2014-12-08 01:43:57+00:00)
Title: Initial framework for carrierwave integration

An initial framework that works for file uploads, and metadata hash that can be serialized in output. Some things of note/to consider:

- Multiple files are not supported. Carrierwave states that multiple files can be uploaded on a single attribute, but I couldn't get the vanilla carrierwave to work, nor do I think it makes sense, so this is unsupported at the moment.
- Multiple versions and nested versions are supported
- There are issues with papertrail and carrierwave (http://stackoverflow.com/questions/9423279/papertrail-and-carrierwave/9440091#9440091). Instead of a slew of monkey patching, users will be required to mount on a different column, which solves all issues. We may want to add a helper to do this automatically
- The xxx_meta column will have to be added if users want metadata to be stored on the file
- Users will have to POST or PATCH a multipart request for the files - it will be two different requests, once for the json body, and another to actually upload the file
- A future enhancement will be to return a s3 url that users can post to directly, for now, it's only supported through the API
- S3 versions need to be turned on in the bucket to work properly - using papertrail, etc, you will be able to get the actual file at that time