what is this 'form-data-encoded image' in add-item command

xviiithangel

Joined: 2005-02-23
Posts: 5
Posted: Wed, 2005-02-23 10:08

im developing a gallery remote version for pocket pc and i encounter this problem: i cant' upload a pic because i dunno this: form-data-encoded image data.

may i know what is this -> 'form-data-encoded image data' in the add-item command

cmd=add-item
protocol_version=2.0
set_albumName=album name
userfile=form-data-encoded image data [since 2.0] or URL of image [since 2.12]
userfile_name=file name (usually inserted automatically by HTTP library, which is why we also have force_filename
caption=caption (optional) [since 2.0]
force_filename=name of the file on the server (optional) [since 2.0]
auto_rotate=yes/no (optional) [since 2.5]
extrafield.fieldname=value of the extra field fieldname (optional) [since 2.3]

 
paour
paour's picture

Joined: 2002-08-14
Posts: 1479
Posted: Thu, 2005-02-24 08:47

Does your file upload library not support this? Usually, MIME-multipart is used for file uploads, where the userfile POST variable is a reference to a MIME part, which is a binary representation of the contents of the file.

You can use a logging proxy to find out how GR sends the add-item request.

Let me know when you reach a testable stage on PPC, it's very interesting!

Good luck

 
xviiithangel

Joined: 2005-02-23
Posts: 5
Posted: Mon, 2005-02-28 04:29

Im using C# in .Net Compact Framework. The only feature I lack is the file upload.
Im using HttpWebRequest in .Net but it always return a connection refused error, I think .Net is more of SOAP.

I do it this way instead:
http://example.com/gallery/gallery_remote2.php?cmd=login....

I know it's very unsecure and i doubt it can never upload the file because of it's limitation, but im searching a way to do that. What im afraid most is that i dunno if .Net can really request from a PHP bec almost all the ref. i have it always pts to ASP.

Im now considering porting some JFC to .Net just to solve this problem

Im sorry sir but i don't have the rights to put up a logging proxy in our org.
If you can sir, pls send me some samples on how GR sends the add-item request.

 
fortyfoxes

Joined: 2006-09-24
Posts: 8
Posted: Sun, 2007-03-11 14:53

Yes is it multipart form encoded?