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

hs.addResourceFile always adds to root directory #112

Open
Castronova opened this issue Oct 17, 2019 · 0 comments
Open

hs.addResourceFile always adds to root directory #112

Castronova opened this issue Oct 17, 2019 · 0 comments

Comments

@Castronova
Copy link
Member

Castronova commented Oct 17, 2019

When using hs.addResourceFile, files are always added to the root directory of the resource regardless if a different resource_filename is provided. It does, however, successfully rename files when using resource_filename though. To reproduce;

import hs_restclient
hs = hs.HydroShare()
  Username: <username>
  Password: <password>
response = hs.addResourceFile(<resource id>,
                              "/tmp/myfile.txt", 
                              resource_filename='mydirectory/abcd.txt')

print(response['file_path'])
abcd.txt

# EXPECTED mydirectory/abcd.txt

sblack-usu added a commit that referenced this issue Oct 17, 2019
#112 added folder option to request parameters
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

1 participant