How to upload a Image with RestSharp without using a local path.
Image exists only in a Image Variable.
All i found was with a string as path, but this is not the way i want to go. Or is it possible to get the string Path from a ImageSource? How can this be solved?
My current code:
var client = new RestClient();
var request = new RestRequest(PostImageUrl, Method.Post);
request.AddOrUpdateHeader("Content-Type", "multipart/form-data");
request.AddFile("image", bauzeichnung);
request.AlwaysMultipartFormData = true;
var response = client.Execute(request);
It is not possible, every file is need a source. But I can suggest methods that I do not recommend.
None of these recommendations are correct methods!!!
The most accurate method;
You can take the image and store it in your machine(Local or Server). Then tahe the path of image and save database as Url(If you don't know the difference between url and path, you should research it). When you send image just send the url of your image.