Mr1Penguin / DeviantartApi

DeviantartApi Library in C# (netstandard 2)
MIT License
6 stars 3 forks source link

Invalid multipart header? #3

Closed libertyernie closed 7 years ago

libertyernie commented 7 years ago

When I try to upload to sta.sh I get an error like this at Requester.cs line 161:

The format of value 'multipart/form-data; boundary=deviapi---8d4e3cdda7f966c' is invalid.

If I comment that line out, I get this error from dA:

Must provide an access_token to access this resource.

Other endpoints (like WhoAmIRequest) work fine.

My upload code is:

var r1 = await new SubmitRequest {
    ArtistComments = txtArtistComments.Text,
    Data = System.IO.File.ReadAllBytes(@"C:\Windows\Web\Wallpaper\Theme2\img8.jpg"),
    IsDirty = false,
    OriginalUrl = "https://www.example.com/hello",
    Tags = new HashSet<string>(txtTags.Text.Replace("#", "").Replace(",", "").Split(' ').Where(s => s != ""))