Click here to Skip to main content
15,878,430 members

Comments by Luis M. Rojas (Top 10 by date)

Luis M. Rojas 5-Jun-23 12:39pm View    
That is what i want
Luis M. Rojas 20-May-23 15:28pm View    
Nothing, never get there, only try.. postasync, try and postasync
Luis M. Rojas 17-Apr-23 10:21am View    
What is client in this line?
These lines:
HttpClientHandler insecureHandler = DependencyService.Get<ihttpclienthandlerservice>().GetInsecureHandler();
HttpClient client = new HttpClient(insecureHandler);
HttpClient client = new HttpClient();

Are you want to upload file more than 16384?
Not, i am just taking a picture with these lines:
var file = await MediaPicker.CapturePhotoAsync() ;
if (file == null) return;
var content = new MultipartFormDataContent();
content.Add(new StreamContent(await file.OpenReadAsync()), "file", file.FileName);
Web API built with..? ASP.NET CORE
Luis M. Rojas 5-Apr-23 11:02am View    
Well, if you see these lines:
content.Add(new StreamContent(await file.OpenReadAsync()), "file", file.FileName);
string url = "";
client.BaseAddress = new Uri(url);
var response = await client.PostAsync("", content);
In this line:
content.Add(new StreamContent(await file.OpenReadAsync()), "file", file.FileName);
I can read and see the file.FileName
But in the Web Api, in this line: public async Task<string> Upload( List <iformfile> files)
files do not recive any value, i mean: it is EMPLY,
How do i pass the value from the program and pass it to the web api.
I did what you said.
Thanks to all
Luis M. Rojas 17-Mar-23 12:16pm View    
In my App the user have to type the following: Place, name, type of transaction, etc and have to take a picture to the invoice from the movil and save everything, my only problem is that i do not know after i have the photo and all data, give a name to the picture file taken to save it