Loose end from 
<URL:https://groups.google.com/d/msg/web2py/CPcbgpK_6Ho/RBjXSMMwGAAJ>:

I have an upload field, and 1 controller to upload to it via SQLFORM and 1 
controller to access it via REST.  Using the SQLFORM, the local filename is 
included in the file data (as seen in the JSON-like representation printed 
to the console during debugging), which is handy.

I've been using CURL to access the REST controller, and I haven't figured 
out how to send the local filename.  As a workaround, I use a string field 
(populated by the URL) to provide a filename.  I would prefer to have this 
field be redundant as it is in the SQLFORM dialog (or perhaps repurpose it; 
there are other strings I might want to record in the record).  My current 
CURL invocation looks like

curl --request POST -T /path/localfile.txt --user user@server pwd
 
http://SERVER/uploader/default/uplift/uploadf/ 
<http://52.34.144.39/uploader/default/shove/uploadf/ServicesAPI.log>
localfile.xt

How can I emulate the SQLFORM's data?

/dps


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to