Skip to content

File service - #411

Open
abdellah257 wants to merge 11 commits into
developfrom
file-service
Open

abdellah257 wants to merge 11 commits into
developfrom
file-service

Conversation

@abdellah257

@abdellah257 abdellah257 commented Aug 25, 2026 •

Copy link
Copy Markdown
Member

Description

This Merge contains changes that covers multiple aspects / features / improvements, including:

  • file endpoints support, to download/stream a single file in raw format.
  • Option to provide an hdf viewing service, that can be served with file/open endpoint.
  • Deprecated the use of directory in POST requests, to make sure the directory can be resolved directly from the dataset. This closes the big issue of given access to a directory that is unrelated to a given dataset.
  • Make sure all file accesses are done under the configured allowedDataDirectory.
  • Deprecated the use of upload endpoint, currently still unsafe to use.
  • More details about the configuration and how the directory is resolved can be found in the README.md

Changes:

new endpoints:

  • POST /file
  • POST|HEAD /file/download
  • POST|HEAD /file/stream
  • POST /file/open

new configuration example:

{
  "zipDir": "/tmpZip",
  "zipRetentionMillis": 3600000,
  "fileLinkRetentionMillis": 3600000,
  "jwtSecret": "secret123",
  "sessionSecret": "fj9832mnsaf3j9adsa",
  "facility": "ILL",
  "allowedDataDirectory": "/data",
  "directoryPathPattern": "/data/{sourceFolder}/{type}",
  "requiredKeywords": ["sourceFolder", "type"],
  "hdfViewServiceUrl": "https://hdf-viewer.example.org",
  "routeBasePath": "",
  "publicOrigin": "https://zip-service.example.org",
  "scicatApiBasePath": "https://scicat.example.org",
  "scicatApiAccessToken": "<scicatServiceAccountToken>",
  "testData": {
    "jwt": "<jwtToken>",
    "files": ["<testFileName1>", "<testFileName2>", "<testFileName3>"]
  }
}

Tests included/Docs Updated?

  • Included for each change/fix?
  • Passing? (Merge will not be approved unless this is checked)
  • Docs updated?
  • New packages used/requires npm install?
  • Toggle added for new features?

@abdellah257
abdellah257 requested review from Junjiequan, bolmsten and nitrosx and removed request for bolmsten August 25, 2026 12:21
@abdellah257
abdellah257 force-pushed the file-service branch 2 times, most recently from 2f28856 to a9cbc8e Compare August 25, 2026 12:56
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.

1 participant