- //IWebHostEnvironment _webHost
- string FileName = Path.GetTempFileName() + "_" + productsI.HeaderImage.FileName;
- string FilePath4 = Path.Combine(_webHost.WebRootPath, "Images", "HeaderImage", FileName);
- using (var stream = System.IO.File.Create(FilePath4))
- {
- await productsI.HeaderImage.CopyToAsync(stream);
- }
It should send it to "C:\Users\user\Desktop\Asp_net_core\Webshop\wwwroot\Images\HeaderImage"
instead of that it is sending it to: C:\Users\user\AppData\Local\Temp
That file path is not even close to what I have programmed C# to do

Salman BegRank #284 · 8.8K reputationPosted Apr 12, 2021, 3:09 AM EDT
osyris zosarRank #6,574 · 262 reputationPosted Apr 12, 2021, 3:23 AM EDT
but i am logged in the right account
How do I give full permission?
Salman BegRank #284 · 8.8K reputationPosted Apr 12, 2021, 3:26 AM EDT
Rijwan AnsariRank #82 · 24.2K reputationPosted Apr 12, 2021, 6:01 AM EDT