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

copy file failed: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': Value is not a valid ByteString #126

Closed
bigthing33 opened this issue Jan 4, 2019 · 4 comments

Comments

@bigthing33
Copy link

bigthing33 commented Jan 4, 2019

I call copyFile method successfuly but
when basename is chinese like “新建文件夹”,
throw error ### Failed to execute 'setRequestHeader' on 'XMLHttpRequest': Value is not a valid ByteString

@bigthing33 bigthing33 changed the title chinese copy file failed Jan 4, 2019
@bigthing33 bigthing33 changed the title copy file failed copy file failed: Failed to execute 'setRequestHeader' on 'XMLHttpRequest': Value is not a valid ByteString Jan 4, 2019
@bigthing33
Copy link
Author

I workaround with "encodeURIComponent".

  • encodeURIComponent(targetBasename)
    like
await client.copyFile("/photos/新建文件夹/", "/%E6%96%B0%E5%BB%BA%E6%96%87%E4%BB%B6%E5%A4%B9/");

@perry-mitchell
Copy link
Owner

Thanks @bigthing33 - This is definitely a bug. We should be encoding that value.

@perry-mitchell
Copy link
Owner

Released in 2.2.1.

@bigthing33
Copy link
Author

The bug has been fixed, thank you!

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

No branches or pull requests

2 participants