how can I make my rails app to receive images from clients through an API using paperclip plugin. I know how to use paperclip using the ordinary form to upload the images, but i need to send images from a mac client. thanks in advance
A:
<% form_for(@object,:url => upload_image_contoller_path, :html=>{:multipart => true }) do |f| %>
<%= f.label 'Image' %><br />
<%= f.file_field :photo %>
<%= f.submit "Add" %>
<% end %>
Also you can add model for paper clip
class MyImage < ActiveRecord::Base
# Paperclip
has_attached_file :photo,
:styles => {
:thumb=> "100x100#",
:large => "400x400>" }
end
For more info you can go through readme file of paperclip plugin.
that was not my question sachinrathore11 :( I already know how to do that, what I'm trying to do is to be able to send images with OUT the FORM.
neuro
2010-07-20 13:01:50
like sending images form an iphone app.
neuro
2010-07-24 08:43:13