$images[] = file_get_contents('/tmp/img1.png');
$images[] = file_get_contents('/tmp/img2.png');
//$images[] = 'this should not work'; <-- test this so see how things fail
$EbayUploadImages = new upload_images([
'app-name' => 'xxxxxxxx',
'cert-name' => 'xxxxxxxx',
'dev-name' => 'xxxxxxxx',
'siteid' => 77,
'auth-token' => 'xxxxxxxx'
]);
$responses = $EbayUploadImages->upload($images);
d($responses);
notice:
siteid
needs to be numbers, if you use letters you might get very strange SSL errors!
state
should cover the result of all uploads, if one failed, it will show you FALSE
with an array key error
.
some more config keys you can use:
- concurrency (number of parallel uploads)
- comp-level (X-EBAY-API-COMPATIBILITY-LEVEL)
- ExtensionInDays (see ebay docu)
hire me: info@macropage.de