Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there ability to get uploading BackgroundTransferRequest's result?

I'm using BackgroundTransferRequest in WP8 application for uploading a file to my server. The server receives the file and send a response back with some useful info regarding uploaded file. How can I get this info?

It seems there's no API for that (shamely). Probably, I'm missing something.

Note that request.BytesReceived property returns 99 bytes, looks like request knows that some data is returned from server, but I've no idea how to get it.

like image 455
Stas Shusha Avatar asked Nov 11 '22 20:11

Stas Shusha


1 Answers

With the great help of Eric Fleck form MSFT we found out that adding DownloadLocation and Method="Post" properties making response to be written in DownloadLocation file. So the valid request is:

var request = new BackgroundTransferRequest(targetUri)
    {
        DownloadLocation = new Uri(downloadTo, UriKind.Relative),
        UploadLocation = new Uri(uploadFrom, UriKind.Relative),
        Method = "POST"
    };
like image 95
Stas Shusha Avatar answered Jan 04 '23 03:01

Stas Shusha