pepe wrote in post #1019809:
> Hi,
>
> I am working on a mobile app that sends a post with a file (a picture)
> "embedded" in the body of the request. I
>

What does that mean?  ALL post requests contain the data in the body of 
the request.


> it is not inside a parameter,
> it is inside of the body.
>

What does that mean?  Are you saying that the html element for the file 
upload doesn't have a name attribute?  Well, then give it one.


> A simplified example of a curl statement to
> simulate what the request does could be this:
>
> curl -X POST my_path --data-binary my_file
>
> When the request gets to the controller the contents of the file can
> be retrieved like this:
>
> str = self.request.body.read
>

I think that would be a raw dump of what's in the body of the request, 
which is different than what's in the file.


> I can run my tests running a server and outside of rspec and directing
> curl requests to localhost

Huh?  What are you trying to test specifically?

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to