Announcement

  •  » Requests
  •  » pwg.session.addsimple

#1 2013-03-08 12:22:02

ThongNguyen
Member
2013-03-08
3

pwg.session.addsimple

Hi all

I'm writting a iphone app and it have a small part integrate with piwigo. I'm using web api of Piwigo to post a photo to gallery from device

In Piwigo's web api, i see that the method pwg.session.addsimple use POST request to send request to server.
After login, i have added 2 parameter like that

NSString *postData = [[NSString /user/image/a.jpgalloc] initWithFormat:@"image=%@&category=%@", @"", @"1"];

But i get response : <rsp stat="fail"><err code="405" msg="The image (file) parameter is missing"/></rsp>

Someone can help me?, many thanks.

Offline

 

#2 2013-03-08 12:31:47

mistic100
Former Piwigo Team
Lyon (FR)
2008-09-27
3277

Re: pwg.session.addsimple

this method doesn't exists... do you mean pwg.images.addSimple ?

the "image" field, is a field of the $_FILES variable, not $_POST or $_GET
it's not a path the image file you must give BUT the image itself

in php/html we achieve this with a <file> form field, I've no idea how it works on iPhone

Offline

 

#3 2013-03-11 06:59:42

ThongNguyen
Member
2013-03-08
3

Re: pwg.session.addsimple

Thanks mistic100, i have got it.

Offline

 
  •  » Requests
  •  » pwg.session.addsimple

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact