Skip to content
Advertisement

Blob file upload – i am uploading image file from local system to azure blob container. Once uploaded, the file size shows as 0B with no extension

I have written a PHP code to upload files from the azure web app (using an upload button from a browser) to azure blob container. I am successfully able to upload the files to the blob container, however, once uploaded the file sits in azure blob as 0 bytes without any extension. I am unable to view the file as well and the following message is shown ‘The file ‘1721405003’ may not render correctly as it contains an unrecognized extension’.

Below is my php code to upload files to blob –

JavaScript

Here is the message that I see in blob container

Advertisement

Answer

I removed the part that related to mysql and the code below works for me:

JavaScript

Result:

enter image description here

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement