Reputation: 60869
I'm creating a simple HTML page that has an image upload. That image then gets sent to a Rails back-end (assume http://www.mycompany.com/myapp/post/
).
I need to:
How would I do this?
Upvotes: 0
Views: 176
Reputation: 3294
Another alternative is CarrierWave https://github.com/jnicklas/carrierwave
Upvotes: 0
Reputation: 2201
Use the excellent Paperclip plugin to do all of the work for you: https://github.com/thoughtbot/paperclip
Upvotes: 1
Reputation:
Rails or not, just:
<form action="URL_GOES_HERE" method="POST"
enctype="multipart/form-data">
<input type="file" name="file"><br/>
<!--- USE HIDDEN FOR YOUR EXTRA PARAMS -->
<input type="submit">
</form>
Upvotes: 0