background-transfer

UWP BackgroundTransfer (CreateDownload / GetCurrentDownloadsAsync) Exception

半城伤御伤魂 提交于 2019-12-13 03:57:01
问题 I am using BackgroundTransfer API for UWP and during my development I achieve much more than the limit (200) of transfer, until now this not become a problem because windows management cancel the transfers over the limit. But now, something occurs that I never can create a new download by BackgroundDownloader().CreateDownload() or call BackgroundDownloader.GetCurrentDownloadsAsync() because this exception always occur: WinRT information: Quota for maximum number of concurrent operations

Wait till the downloading is finished Windows phone

≡放荡痞女 提交于 2019-12-12 09:28:20
问题 How can i wait till the download operation is finished and want to return a status true or false back to UI .Now i am using Webclient for downloading image like this private async Task SaveCoversAsync(string CoverImageUrl) { WebClient getImageClient = new WebClient(); getImageClient.OpenReadCompleted += new OpenReadCompletedEventHandler(getImageClient_OpenReadCompleted); getImageClient.OpenReadAsync(new Uri(CoverImageUrl), CoverImageUrl); } private async void getImageClient_OpenReadCompleted

resize image before upload via background transfer in winjs

故事扮演 提交于 2019-12-12 04:56:12
问题 I would like to resize an image picked from the gallery of the phone before uploading it via background transfer so far I have:- filePicker.pickSingleFileAsync().then(function (file) { uploadSingleFileAsync(uri, file); }).done(null, displayException); function uploadSingleFileAsync(uri, file) { if (!file) { displayError("Error: No file selected."); return; } return file.getBasicPropertiesAsync().then(function (properties) { if (properties.size > maxUploadFileSize) { displayError("Selected

Uploading files to Onedrive using REST API

孤人 提交于 2019-12-12 02:15:56
问题 I am trying to upload a file into OneDrive using its REST API. This is what I am trying to accomplish based on documentation available at OneDrive Rest API: POST https://apis.live.net/v5.0/me/skydrive/files?access_token=ACCESS_TOKEN Content-Type: multipart/form-data; boundary=A300x --A300x Content-Disposition: form-data; name="file"; filename="HelloWorld.txt" Content-Type: application/octet-stream Hello, World! --A300x-- This is what I have: Uri destination = new Uri(string.Format("https:/