Awais Qarni Posted March 21, 2016 Report Share Posted March 21, 2016 (edited) Hi, I am uploading an image to adserver using addBanner Service but I am getting "Unrecognized image file format" error. I have attached the image showing the final array I am sending to addBanner function of the service. Can any body please let me know what I am doing wrong? Best Regards,Awais Qarni Edited March 21, 2016 by Awais Qarni Quote Link to comment Share on other sites More sharing options...
yannux Posted March 22, 2016 Report Share Posted March 22, 2016 Can you attach the image for testing ? Quote Link to comment Share on other sites More sharing options...
Awais Qarni Posted March 22, 2016 Author Report Share Posted March 22, 2016 @yannux Any png or jpg file you can use. Quote Link to comment Share on other sites More sharing options...
Matteo Beccati Posted March 24, 2016 Report Share Posted March 24, 2016 @Awais Qarni it's not very clear what's the payload you are sending to the api or what you're using to call it. My guess is that you are not using the bundled php client and forgot to use a base64 xml-rpc type for the binary data and are sending a plain base64 encoded string instead. Quote Link to comment Share on other sites More sharing options...
Awais Qarni Posted March 24, 2016 Author Report Share Posted March 24, 2016 @Matteo. Thank you for your response. Can you please explain what do you mean by bundled php client? Quote Link to comment Share on other sites More sharing options...
Matteo Beccati Posted March 24, 2016 Report Share Posted March 24, 2016 https://github.com/revive-adserver/revive-adserver/blob/master/lib/xmlrpc/php/openx-api-v2-xmlrpc.inc.phpit also requires PEAR to be in the include path, so you'll need something like:set_include_path('.;path/to/lib/pear'); Quote Link to comment Share on other sites More sharing options...
Asif Posted March 24, 2016 Report Share Posted March 24, 2016 Hi Matteo Me and Awais are working in the same project. We ahead have PEAR in or part and are calling lot of other web services using XML RPC already on our revive server. Do you have any code examples of uploading images using the addBanner() service?Your help is much appreciated.RegardsAsif Quote Link to comment Share on other sites More sharing options...
Matteo Beccati Posted March 24, 2016 Report Share Posted March 24, 2016 I don't, but using the library above, it should be fairly straightforward to create a BannerInfo object and passing it to the addBanner() method. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.