Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZF2 XML_RPC Problem Sending Image Content #3

Open
weierophinney opened this issue Dec 31, 2019 · 0 comments
Open

ZF2 XML_RPC Problem Sending Image Content #3

weierophinney opened this issue Dec 31, 2019 · 0 comments

Comments

@weierophinney
Copy link
Member

This issue has been moved from the zendframework repository as part of the bug migration program as outlined here - http://framework.zend.com/blog/2016-04-11-issue-closures.html


Original Issue: zendframework/zendframework#7619
User: @narimani
Created On: 2015-08-27T07:37:36Z
Updated At: 2015-11-06T22:17:26Z
Body
Hi. I am trying to send a photo via xml_rpc like this:

$data = array(
 'phpads55deb65dd5ca45.43027895',
'aImage' => array(
                    'filename' => $file['aImage']['name'],
                    'content' => file_get_contents($file['aImage']['tmp_name']),
                ),
'campaignId' => 1,
'storageType' => 'web'
);

$this->client = new Client('http://example.com/api/v2/xmlrpc/');
$this->client->call('ox.addBanner',  $data);

I get the request via Fiddler witch shows this:

POST http://example.com/api/v2/xmlrpc/ HTTP/1.1
Host: example.com
Connection: close
Accept-Encoding: gzip, deflate
Content-Type: text/xml; charset=utf-8
Content-Length: 771
Accept: text/xml
User-Agent: Zend_XmlRpc_Client

<?xml version="1.0" encoding="UTF-8"?>
<methodCall><methodName>ox.addBanner</methodName><params><param><value><string>phpads55deb65dd5ca45.43027895</string></value></param><param><value><struct><member><name>campaignId</name><value><int>1</int></value></member><member><name>bannerName</name><value><string>khgjjhj</string></value></member><member><name>aImage</name><value><struct><member><name>filename</name><value><string>logo.png</string></value></member><member><name>content</name><value><string>�PNG&#13;
�
</string></value></member></struct></value></member><member><name>comments</name><value><string>dfgdgdfgdfg</string></value></member><member><name>storageType</name><value><string>web</string></value></member></struct></value></param></params></methodCall>

And as you can see the full image is not there in the request. What is the problem?



Originally posted by @GeeH at zendframework/zend-xmlrpc#20

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant