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

not encode filename when uploading #79

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cielavenir
Copy link

because filename field must not be encoded. I checked the behavior by clientpy experiments.

@cielavenir
Copy link
Author

cielavenir commented Oct 9, 2020

keeping unassigned intentionally until webstack1 one is merged.

webstack2 still has the issue

@rdiankov
Copy link
Member

@ziyan can you comment with respect to new webstack?

@ziyan ziyan marked this pull request as draft April 27, 2022 04:54
@ziyan
Copy link
Member

ziyan commented Apr 27, 2022

We use https://pkg.go.dev/mime/multipart#Part.FileName which internally uses https://pkg.go.dev/mime#ParseMediaType and it does not expec the filename part ot be encoded.

@ziyan
Copy link
Member

ziyan commented Apr 27, 2022

Additionally, we also support ?filename= in url and filename filed in the multipart form body.

@cielavenir
Copy link
Author

issue seems still there

ipython2

import mujincontrollerclientcpppy
client = mujincontrollerclientcpppy.CreateControllerClient('mujin:mujin', 'localhost')
client.UploadFile('あ.txt', 'mujin:/あ.txt')

master

ls /data/media/mujin/
%E3%81%82.txt

notEncodeFilenameWhenUploading

ls /data/media/mujin/
あ.txt

@cielavenir
Copy link
Author

meanwhile let me check filename= in uri

@cielavenir
Copy link
Author

so let's adopt #107

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

Successfully merging this pull request may close these issues.

3 participants