I can now answer in more detail, as I've actually done it now.
After doing an upload page based on the Image Blog example in Chapter 3, I moved on to RESTing on curl. The Chapter 10 material was helpful, as was Chapter 6 under "More on uploads".
The archive has some older posts that helped me, and actually pushed me across the finish line:
Date: Wed, 15 Feb 2012 12:25:24 +0000
Subject: Re: [web2py] Re: can we use JSONRPC to upload?
(From Antonio Ramos)
Subject: Re: [web2py] Re: Auto-generate PUT and DELETE methods
Date: Wed, 20 Jun 2012 20:42:17 -0700 (PDT)
(From Massimo)
Date: Thu, 10 Sep 2009 13:36:13 -0700 (PDT)
Subject: Re: Database administration - db upload field
(Massimo, earlier)
I'm using cStringIO.StringIO on the request data, but I'm sending binary (curl -H "Contnt-Type: application/octet-stream"), and the file is stored in uploads with a .txt extension, which makes Firefox think it should maybe open it with gedit (when right clicking from the appadmin page). Saving the download to a file is okay, and I can untar a tar file, and another binary file compares okay, but it would be nice to get the type correct on download.
Also, I had to the use the "def POST(*args, **vars)" form, and couldn't figure out how to do it the parse_as_restfull() technique, partly because I couldn't figure out the URL and curl invocation to handle the file data. Furthermore, the curl -T doesn't seem to be putting the local filename into the POST, whereas the SQLFORM does. I have an fname field, which is redundant in the SQLFORM version, but is what I use in the RESTful upload.
So I finally did Yet Another Web2Py Trick. The SQLFORM version took me half an hour or less, and then I broke things for a while trying to see what the POST url looked like, and then spent the rest of the afternoon on the REST.
/dps "YAW2PT-count++"