I have an action where I am putting zip files and those zipped files are unzipped. Now, the problem is, when I am unzipping those files....those files are saved into the App_Data folder in a weird format. Note that, I am saving the directory path as the string in my database table(img1).
What I want is, I want to save the path in normal string format like this,
Because when I am trying to show those files like <a href="@Url.Content(Model.filepath)">Download</a>, I am not getting any file because of that weird format.
here is my controller(img13, img14, img15)
May be your issue is in
path it must be
string path = AppDomain.CurrentDomain.BaseDirectory + "/App_Data/uploads/";
Try saving above path using forward slash, take a reference from ZipFile.ExtractToDirectory(zipPath, extractPath);
You can also take a look on complete article on this
Let me know if it doesn't help, i will test your code locally
Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly