Answer the question
In order to leave comments, you need to log in
How can I upload products to the market group now?
This morning, the unloading of goods to the group's market stopped working due to the fact that on the VK side the format of the response from the server has changed. When sending a post request to a url obtained from photos.getMarketUploadServer in the response, the crop_data field receives not a string at all, as it is written in the documentation, but an array, and it is not clear what to do with it now.
I tried to send data from ['crop_data']['photo'] to the photos.saveMarketPhoto method, it swears at invalid crop_data
That's what the server actually returns. This is a dump from PHP after being processed by the json_decode function
array (
'server' => 840732,
'photo' => '[{"photo":"733586a0c2:x","sizes":,"latitude":0,"longitude":0,"kid":"8bf3901f3b9adb6f1b83b04fe0292002"}]',
'hash' => 'ee6bf35e499138ca2bf6c36b0d64934c',
'crop_data' =>
array (
'photo' => '73b9f578a9x',
'sizes' =>
array (
0 =>
array (
0 => 'max',
1 => 840732749,
2 => '73b7c',
3 => 'HGSt_2DtPdY',
4 => 600,
5 => 600,
),
1 =>
array (
0 => 'b',
1 => 840732749,
2 => '73b7d',
3 => 'wV-aRf7ppys',
4 => 400,
5 => 400,
),
2 =>
array (
0 => 'c',
1 => 840732749,
2 => '73b7e',
3 => 'UuPoXtkCR-8',
4 => 300,
5 => 300,
),
3 =>
array (
0 => 'd',
1 => 840732749,
2 => '73b7f',
3 => 'RLQgnmdwVYU',
4 => 200,
5 => 200,
),
4 =>
array (
0 => 'e',
1 => 840732749,
2 => '73b80',
3 => 'XywsP84FqLk',
4 => 150,
5 => 150,
),
5 =>
array (
0 => 'f',
1 => 840732749,
2 => '73b81',
3 => '17PwS_ozMgU',
4 => 100,
5 => 100,
),
6 =>
array (
0 => 'g',
1 => 840732749,
2 => '73b82',
3 => 'S-4qnibrG00',
4 => 50,
5 => 50,
),
7 =>
array (
0 => 'o',
1 => 840732749,
2 => '73b7c',
3 => 'HGSt_2DtPdY',
4 => 600,
5 => 600,
),
),
),
'crop_hash' => 'a3774f8b17130f6efda455aa1c7378e7',
)
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question