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

specify filename in UploadFileToControllerViaForm #107

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

Conversation

cielavenir
Copy link

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

ls /data/media/mujin
あ.txt

closes #79

@ziyan ziyan marked this pull request as draft April 30, 2022 13:23
@rdiankov
Copy link
Member

rdiankov commented May 1, 2022

@cielavenir do we have to worry about back compat with existing users?

@cielavenir
Copy link
Author

@rdiankov

back compat with existing users

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

master

RuntimeError: mujin (): Json string is invalid (offset 4) The document root must not be followed by other values. str=404 page not found

uploadFileNameInURI

''

This means previously (without uploadFileNameInURI) uploaded file could not be accessed.

@cielavenir
Copy link
Author

cielavenir commented May 2, 2022

Or do you mean this works (currently) and some users might do this weird convertion?

import mujincontrollerclientcpppy
client = mujincontrollerclientcpppy.CreateControllerClient('mujin:mujin', 'localhost')
client.UploadFile('あ.txt', 'mujin:/あ.txt')
client.DownloadFile('mujin:/%E3%81%82.txt')

[edit] if no, I don't think of other worries

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