upload path

Tom7254
Tom7254 Member Posts: 4
edited June 12 in Developer APIs

I am tryin to get an image upload to Cloudinary. The following code is what I am using:

foreach (var file in args.Files)
{
var path = @"https://res.cloudinary.com/dtm6vdbf7/image/upload/" + file.FileInfo.Name;
FileStream filestream = new FileStream(path, FileMode.Create, FileAccess.Write);
await file.File.OpenReadStream(long.MaxValue).CopyToAsync(filestream);
filestream.Close();
}

The filename, directory name, or volume label syntax is incorrect. : 'D:\FieldMRIServices-master\FieldMRIServices\https:\res.cloudinary.com\dtm6vdbf7\image\upload\DSC00006.JPG

Tagged:

Answers