Skip to content

hs.addResourceFile always adds to root directory #112

@Castronova

Description

@Castronova

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions