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
Jack
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
Dilan Alexiyas Silva
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
Greg Katechis
Hi Dilan! Can you take a look at this article and see if it gets you moving in the right direction?
0