Reputation: 523
I have a folder in wwwroot folder named Images. I want to save my images to that folder. Right now the images are being saved in the wwwroot folder (outside Images), and the name of the image saved starts with Images. Here is the code that I'm using:
string filepath = Path.Combine(_caminho.WebRootPath, "Images" + name);
"name" ia a string that has the name of the image. Why is this happening?
Upvotes: 0
Views: 742
Reputation: 162
It seems that you're concatenating the string "Images"
to name
. I would suggest that you do
(..."Images", name);
Upvotes: 1