Last post Jan 12, 2019 03:40 PM by kamalhussain
Jan 12, 2019 02:53 PM|kamalhussain|LINK
Currently I have an asp page which uses an asp control to upload files to azure.
The control runs server side code which reads the file into azure local storage and then transfers the file from local storage to blob storage.
No issues, this is working fine. Now, I want to replace the asp control with an html control so that, in the longer term. I have studied some blogs but I cannot catchup.
Is there someone can help me just telling steps to upload from html to azure? Thanks!
Jan 12, 2019 03:03 PM|mgebhard|LINK
The asp control renders as a standard HTML file upload element.
Is this a Web Forms application? MVC, Razor Pages? Is there anyway you can post source code that reproduces the issue? Can you post any error messages?
Jan 12, 2019 03:03 PMfirstname.lastname@example.org|LINK
You can try with
1. read the file as a DataURL into a FileReader
2. slice the returned string up and send each slice up to the server where it is stored in a session variable
3. Once the whole file has been sent up then call another web service which glues the slices back together and turns the result into a byte array
4. The byte array is then stored as a file in local storage in azure
5. Finally, the file is transferred from local storage into blob storage
Hopefully, will not be any issue. Thanks!
Please don't forget to mark as answer if it helps you. Thanks!
Jan 12, 2019 03:09 PMemail@example.com|LINK
It’s probably not the best way to do it, but it seems to work. Thanks
Jan 12, 2019 03:40 PM|kamalhussain|LINK
Thanks rubaiyat2009. Your steps are working fine.