Open Castronova opened 4 years ago
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;
hs.addResourceFile
resource_filename
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
When using
hs.addResourceFile
, files are always added to the root directory of the resource regardless if a differentresource_filename
is provided. It does, however, successfully rename files when usingresource_filename
though. To reproduce;