GithubHelp home page GithubHelp logo

Comments (9)

npflood avatar npflood commented on August 30, 2024 1

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.

dwilkie avatar dwilkie commented on August 30, 2024

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.

rapcal avatar rapcal commented on August 30, 2024

Thank you a lot for your feedback!

from carrierwave_direct.

ryanmcadler avatar ryanmcadler commented on August 30, 2024

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.

dwilkie avatar dwilkie commented on August 30, 2024

@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.

ryanmcadler avatar ryanmcadler commented on August 30, 2024

@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.

brightball avatar brightball commented on August 30, 2024

+1 for a demo app

from carrierwave_direct.

Tarikus avatar Tarikus commented on August 30, 2024

+2

from carrierwave_direct.

dwilkie avatar dwilkie commented on August 30, 2024

https://github.com/dwilkie/carrierwave_direct_example

from carrierwave_direct.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.