Comments (9)
I hunted quite a while looking for this same answer, I recommend bumping this information into the README. This is especially important because currently the documentation makes CarrierWave_Direct look like it operates in precisely the same way as CarrierWave, which it doesn't, and for good reason.
from carrierwave_direct.
Hey,
Remember that when you use: <%= direct_upload_form_for @uploader %>
The form will post directly to S3. If the upload is successful S3 redirects the user back to your application but it only includes the bucket, key and etag and nothing more.
When I want to use this gem with a project such as yours, I would use a multi-stage form, so that the user can upload their avatar first in a form on it's own by selecting a file then pressing "Next", then you have the form to create their profile on the next page.
There's an example of this in the README under: Processing and referencing files in a background process
For more info on what S3 returns see: http://doc.s3.amazonaws.com/proposals/post.html
from carrierwave_direct.
Thank you a lot for your feedback!
from carrierwave_direct.
I'm grappling with a similar question, but more so from a reverse perspective (retrieving the uploaded file from a S3 bucket). I have the following test app that successfully uploads with carrierwave_direct and then goes on to call the new method of an associated model:
https://github.com/ryanmcadler/carrierwave_direct_test_app
How should call the uploaded file in say, the show view of an associated model? I assume the usual means of doing this with just carrierwave/fog (e.g. post.photo_url() ) won't work because the file gets stored within a UUID-named directory?
Thanks in advance...
from carrierwave_direct.
@npflood feel free to add what you think is missing to the README and send me a pull request and I'll pull your changes in.
from carrierwave_direct.
@dwilkie @npflood It would be my pleasure to submit a pull request for the README but I haven't had time lately to work out my issue.
@npflood Could you perhaps post the resource that helped you figure it out?
Alternatively, if a simple demo app could be committed this would really help.
from carrierwave_direct.
+1 for a demo app
from carrierwave_direct.
+2
from carrierwave_direct.
https://github.com/dwilkie/carrierwave_direct_example
from carrierwave_direct.
Related Issues (20)
- One Form Action HOT 2
- Asyn upload?
- Unable to use AWS4-HMAC-SHA256 HOT 4
- does not work as expected with AWS - SignatureDoesNotMatch HOT 1
- Bypass/Disable carrierwave_direct
- It doesn't seem like the latest changes are in 2.0.0 HOT 1
- How do I combine carrierwave direct with active admin HOT 2
- FilenameFormatValidator fails for every new object HOT 6
- Need to create an upload programmatically HOT 3
- POSTing to S3: InvalidPolicyDocument HOT 9
- carrierwave_direct not working with rails 6 undefined method 'attr_accessible'
- Can I still upload a file from code in Rails? HOT 1
- Readme validation example are incorrect HOT 1
- Support for CarrierWave 2.2+ HOT 1
- How to Properly Configure Test Environment? HOT 2
- ActiveModel::UnknownAttributeError (unknown attribute 'key') HOT 1
- Unable to download and process image after successful direct upload to S3 HOT 1
- Limit filetypes to upload
- React integration
- Is it possible to style the button?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from carrierwave_direct.