Recent searches


No recent searches

Uploaded image is empty or corrupted



Posted May 09, 2022

Hi Team,

I'm trying to upload a image (downloaded from google), through Spring boot code. The image seems uploaded but I cannot see the thumbnail, even when I download the image it always 1 KB, so empty or broken. 

Details : 

API - /api/v2/uploads?filename=<my file name>

header - headers.set("Content-Type", "application/binary");

Can someone please help on this ?

Thanks,

Dilan.

 


0

3

3 comments

Hi Dilan,

I think your problem might be to do with the MIME type you are setting, you’re setting it to application/binary but the file is an image.

Could you try changing it to image/jpeg and let me know if that works?

0


Hi, Thanks for quick response.

I changed the content type to "image/jpeg", but still the same result. I can only see the empty image.

Thanks.

0


image avatar

Greg Katechis

Zendesk Developer Advocacy

Hi Dilan! Can you take a look at this article and see if it gets you moving in the right direction?

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post