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

How can i upload a file with chinese name #4279

Closed
kakasu opened this issue Sep 29, 2022 · 3 comments
Closed

How can i upload a file with chinese name #4279

kakasu opened this issue Sep 29, 2022 · 3 comments

Comments

@kakasu
Copy link

kakasu commented Sep 29, 2022

when i upload a file with chinese name ,it throws:
java.lang.IllegalArgumentException: Unexpected char 0x4e2d at 37 in Content-Disposition value: form-data; name="content"; filename="中文2038_right_1654846703.jpg"

the code:
String repository = "hanzi";
String branch = "main";
String path = "中文2038_right_1654846703.jpg";
String storageClass = null;
String ifNoneMatch = null;
File content = new File("D:\eyedata\demo6\images\中文2038_right_1654846703.jpg");
ObjectStats response = api.uploadObject(repository, branch, path, storageClass, ifNoneMatch, content);

@arielshaqed
Copy link
Contributor

Could this be a case of OpenAPITools/openapi-generator#5117 in the upstream code generator?

@kakasu , could you try to URI-encode the path argument? If that works, then per the upstream bug it's a pervasive issue with OpenAPI code, and IIUC the spec itself is unclear over which form to use.

@talSofer talSofer added the team/versioning-engine Team versioning engine label Oct 12, 2022
Copy link

github-actions bot commented Nov 1, 2023

This issue is now marked as stale after 90 days of inactivity, and will be closed soon. To keep it, mark it with the "no stale" label.

@github-actions github-actions bot added the stale label Nov 1, 2023
Copy link

Closing this issue because it has been stale for 7 days with no activity.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 10, 2023
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

4 participants