![]() ![]() Read the data stream received by the HTTP request IInputStream inputStream = await () ħ. AsTask(tokenSource.Token, progressCallback) Ħ. Get the response headers var request = new HttpRequestMessage(HttpMethod.Get, new Uri()) HttpResponseMessage response = await client.SendRequestAsync(request). ![]() Initialize the HttpClient and set the progress handler var client = new HttpClient() Progress progressCallback = new Progress(httpProgressCallback) ĥ. Retrieve the FileStorage object StorageFile file = await savePicker.PickSaveFileAsync() Ĥ. Var savePicker = new ()) savePicker.SuggestedFileName = photo.Id // pre-fill file's nameģ. Create a FileSavePicker object to let the user choose the file’s destination NOTE: You need to add Pictures Library capability to give your app read & write accesses to the Pictures Library.string fileName = "test.jpg" StorageFile file = await localFolder.CreateFileAsync(newFileName) StorageFolder localFolder = // Create a new file in the app's local folder. Here is a quick sample: using System using Windows.Storage // Get the app's local folder to use as the destination folder. ![]() ![]() But you must provide a StorageFile object to save the image to the device’s storage. NOTE: If you don’t want to use a FileSavePickerin your app, skip the first three steps. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |