Skip to main content

Add resource path utility endpoints.

Project description

A Girder plugin to add some server-side tools that work with resource paths.

Features

  • Download by path.

    GET /resource/path/download/<resource path> will download the collection, user, folder, item, or file. If there is a single file within a parent object, the file will be downloaded directly. If there are multiple files, a zip file will be downloaded.

  • Redirect by path.

    GET, PUT, POST, DELETE /resource/path/redirect/<resource path>[/<path components>] will redirect to the appropriate model route for the last identifiable Girder model within the route.

    Since only routes that the user has permission for can be accessed, this can have strange repercussions if the resource path has components that look like route paths. For instance, PUT /resource/path/redirect/user/User/Public/ItemA/metadata will either modify an item’s metadata OR alter a file named metadata within the item.

    Also, redirecting has a significant overhead compared to accessing a route by model and id, as the resource path must be validated and checked for permissions.

  • Browse files via path.

    A GET /files endpoint is added at the server’s root (not under the /api/v1 route). This responds much like an ftp server, providing HTML listings of available resources (based on the current user). If the path is a single-file item or a file, then the appropriate file is returned. For instance /files/user/User/Public/ would list folders and items within the user’s Public folder, while /files/user/User/Public/ItemA/File1 will download the specified file.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

girder-resource-path-tools-0.0.0.zip (10.8 kB view details)

Uploaded Source

File details

Details for the file girder-resource-path-tools-0.0.0.zip.

File metadata

  • Download URL: girder-resource-path-tools-0.0.0.zip
  • Upload date:
  • Size: 10.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.1.0 requests-toolbelt/0.9.1 tqdm/4.34.0 CPython/3.7.0

File hashes

Hashes for girder-resource-path-tools-0.0.0.zip
Algorithm Hash digest
SHA256 c46d4352e2620949d99cd6c8477a480680033cef99584f08cc04845d55da70c2
MD5 06fd715655f7b6df75283584bf810ca9
BLAKE2b-256 ebf8987b5cfd3777413296b84aac0c6119c11d8bf57210e5df75684e1525f248

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page