Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upload task fails when filename contains UTF-8 characters #18

Open
PontusMagnusson opened this issue Dec 19, 2022 · 2 comments
Open

Upload task fails when filename contains UTF-8 characters #18

PontusMagnusson opened this issue Dec 19, 2022 · 2 comments

Comments

@PontusMagnusson
Copy link

PontusMagnusson commented Dec 19, 2022

When trying to upload files, the task fails because filenames containing UTF-8 chars (for example "åäö") are serialized in a way that the CloudConvert jobs can't understand.

private async Task UploadFile(Response<JobResponse> job, byte[] fileData, string fileName)
{
    var uploadTask = job.Data.Tasks.FirstOrDefault(t => t.Name == "upload_file");

    await _cloudConvertApi.UploadAsync(uploadTask.Result.Form.Url.ToString(), fileData, fileName, uploadTask.Result.Form.Parameters);
}

If a file has the filename "Sverigesköld.eps" it fails with an "INVALID_FILENAME" because the filename sent to the API is "=?utf-8?B?U3ZlcmlnZXNrw7ZsZC5lcHM=?=".

@josiasmontag
Copy link
Contributor

Can you check if #19 fixes this for you?

@PontusMagnusson
Copy link
Author

@josiasmontag Yep, that seems to fix the issue! 👍

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

No branches or pull requests

2 participants