Skip to content

Track Upload Error: Request entity contains invalid byte sequence. Please transmit valid UTF-8. #5

@gustavorps

Description

@gustavorps
string tmpMp3FilePath = $@"/tmp/track.mp3";
string tmpCoverFilePath = $@"/tmp/cover.jpg";
var fileMp3Stream = File.OpenRead(tmpMp3FilePath);
var fileCoverStream = File.OpenRead(tmpCoverFilePath);

var client = new SoundCloudConnector().DirectConnect(this.clientId, this.clientSecret, this.username, this.password);

client.Tracks.UploadTrack(fileMp3Stream, upload.name, "", SCSharing.Private, null);
System.AggregateException: One or more errors occurred. (Upload failed. Parameters: uri = https://api.soundcloud.com/tracks.json?oauth_token=SECRET&client_id=SECRET. Files: fake.jpg. Response: 400 - Request entity contains invalid byte sequence. Please transmit valid UTF-8.) ---> SoundCloud.API.Client.Internal.Infrastructure.Network.WebGatewayException: Upload failed. Parameters: uri = https://api.soundcloud.com/tracks.json?oauth_token=SECRET&client_id=SECRET. Files: fake.jpg. Response: 400 - Request entity contains invalid byte sequence. Please transmit valid UTF-8. ---> System.Net.WebException: The remote server returned an error: (400) Bad Request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions