Hi
How to save file in Application Folder using Api. We r using RestSharp
Thanks
Hi
How to save file in Application Folder using Api. We r using RestSharp
Thanks
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Puneet KankarPosted Dec 28, 2022, 7:01 AM
var uploadFolder = Path.Combine(Directory.GetCurrentDirectory(), "UploadedFiles");
var finalPath = Path.Combine(uploadFolder, fileName);
Check this video as well you can get better Idea
https://www.youtube.com/watch?app=desktop&v=FdRxkjA_ZQ8
Ramco RamcoPosted Dec 28, 2022, 5:45 AM
Hi Puneet
what change should i do in below code so that file is saved in application folder. I am using RestSharp
string Path = @"C:\Windows\Temp\";
Thanks
Puneet KankarPosted Dec 28, 2022, 4:59 AM
Hello,
Please check below link.
https://www.c-sharpcorner.com/UploadFile/ankithakur/uploading-streamimages-to-rest-api-using-restsharp/
https://restsharp.dev/usage.html#recommended-usage