0
Answered

Problem uploading Images via API

mcesarini 5 months ago • updated 5 months ago 1

Hi,

I have a problem when I try to upload images via API ( not txt or PDF ) . If the file is uploaded successfully ( { "success": true, "error": false, "data": [] } , the image is "broken" if I try to download or to use the link (for example:  https://cloudmktg.estra.it/wl/?id=fdQNh0GXJnb6rEIhjAgfT8QC2ewCtVgO)  

Here my curl:

curl -X PUT \

'https://cloudmktg.estra.it/api.php/files/upload/?path=/ROOT/HOME/testcesa/test.jpg

' \

-H 'Authorization: Bearer XXXXXXXXXXXXXXXXXXXXXXXXX' \

-H 'Content-Disposition: form-data;name="file"; filename="ignored.jpg"' \

-H 'Content-Type: multipart/form-data' \

-H 'Postman-Token: 3f6957ff-b85a-45c0-9e40-6ac2292bbd3b' \

-H 'cache-control: no-cache' \

-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \

-F filename=@/Users/mcesarini/Documents/Pictures/Pictures/black-sails.jpg

Thanks

Answer

Answer
Answered

Hi,

I solved it by my self, using a binary request

bye 

Answer
Answered

Hi,

I solved it by my self, using a binary request

bye