Hello @某も mo ,
I think the real question is how to send a jsonencoded picture quickly without it being time out given that the client does not wait more than 10 seconds
The 10-second timeout is a little short, you could try to extend the timeout, refer to:
HttpClient client = new HttpClient() { Timeout = TimeSpan.FromSeconds(90) }; // such as 90s
You also need to check the timeout of your server.
In addition, you said "the image is too big", consider to compress the image while uploading, refer to https://learn.microsoft.com/en-us/samples/xamarin/xamarin-forms-samples/xamformsimageresize/
If the image is too large to affect the main thread, consider to make a background session and upload task on iOS, refer to https://learn.microsoft.com/en-us/xamarin/ios/app-fundamentals/backgrounding/ios-backgrounding-walkthroughs/background-transfer-walkthrough
Best Regards,
Wenyan Zhang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.