Skip to content
This repository has been archived by the owner on Nov 29, 2021. It is now read-only.

Upload url for background transfers. #5

Open
dqtruong opened this issue Dec 11, 2013 · 2 comments
Open

Upload url for background transfers. #5

dqtruong opened this issue Dec 11, 2013 · 2 comments

Comments

@dqtruong
Copy link

I'm writing app on Windows Phone 8.

I get upload url via UploadUrl method and add it to background transfers. I receive error code 400 when background transfer finish.

And why MakeUploadRequest method don't use filename parameter?

@dkarzon
Copy link
Member

dkarzon commented Dec 12, 2013

Do you have any more info on the 400 response?

I think that filename parameter is just left over from old code where it set that as parameter for the request but its not needed anymore.

@dqtruong
Copy link
Author

private void Upload()
{
var uri = this.Client.UploadUrl("/", "test.jpg");
this.BackgroundUpload(uri);
}

private void BackgroundUpload(Uri uploadUri)
{

        BackgroundTransferRequest request = new BackgroundTransferRequest(uploadUri);
        request.Method = "POST";
        request.Tag = uploadUri.OriginalString;
        request.UploadLocation = new Uri("shared\\transfers\\question-mark.jpg", UriKind.Relative);

        request.TransferProgressChanged += request_TransferProgressChanged;
        request.TransferStatusChanged += request_TransferStatusChanged;
        BackgroundTransferService.Add(request);
    }

I received error code 400 and message "The http network provider returned an error".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants