Repository navigation
SOF-8099: upload every file through a signed putObject URL - #408
Conversation
The platform no longer accepts file bodies (public POST files is removed), so upload_files asks files/signed-urls for one putObject URL per file, with the size and content type to enforce, and PUTs the bytes with the returned headers. Text is uploaded as UTF-8; the notebooks pass file bytes as they are. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
The sign-and-PUT steps move to mat3ra-api-client (FileEndpoints, mat3ra/api-client#51), so the custom calculation notebooks call client.files.upload and notebooks_utils keeps only to_object_storage_input. Until that PR is released, pyproject.toml pins its commit and config.yml installs a wheel built from it (packages/); both go back to a released version before merging. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Replaces the git pin and the bundled test wheel with the release that ships client.files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Jira: SOF-8099
Platform change: mat3ra/web-app#3026. Merge and release this PR together with it.
Uses
client.filesfrom mat3ra/api-client#51, released asmat3ra-api-client2026.11.4.post0.Why
The platform no longer accepts file bodies: public
POST filesis removed, and every file goes straight to storage with a signed URL. The notebooks uploaded text throughPOST files, so they would break.What changes
custom_python_calculation.ipynb,custom_shell_calculation.ipynb): upload with one call to the API client,client.files.upload(files_to_upload, account_id=ACCOUNT_ID). Files are read as bytes and passed on as they are; the markdown no longer says text "travels inside the request".notebooks_utils/core/entity/file/api.py: keeps onlyto_object_storage_input. The upload itself (onefiles/signed-urlsputObjectrequest with each file's size and content type, then a PUT per file with the signed headers) now lives inmat3ra-api-clientasFileEndpoints.upload, with its tests.Dependency
pyproject.tomlandconfig.yml(api,api_examples) requiremat3ra-api-client>=2026.11.4.post0.Testing
pytest tests/py/unit: 143 passed with the client from api-client#51 (the earlierJobEndpoints.authfailure was an outdated client).client.filesagainst a local web-app (S3): text and binary upload, download round-trip, folder delete.pyodide-http, a binaryrequests.putto a signed S3 URL with the signed headers returns 200 and the object reads back byte for byte.api-examples/custom_python_calculationandcustom_shell_calculationcover the notebooks.🤖 Generated with Claude Code