forum

Home / DeveloperSection / Forums / Asp.NET temporary file saving

Asp.NET temporary file saving

Anonymous User 1966 28-Mar-2015

I got a path from the jquery code URL.createObjectURL(event.target.files[0]); 

It returns something like this : blob:http%3A/localhost%3A59105/f7dae0f7-088f-48cf-b446-eeda0bf23705 

I tried to save this file like 

byte[] data;
    using (WebClient client = new WebClient())
    {
        data =client.DownloadData("blob:http%3A/localhost%3A59105/f7dae0f7-088f-48cf-b446-eeda0bf23705");
    }
    File.WriteAllBytes(@"~/a.jpg", data);

But it gives an error about the code above: 

  The URI prefix is not recognized.

How exactly I can copy this file? 

Thanks for your suggestions.


Updated on 28-Mar-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By