Skip to content

Add LocalDirectoryStorage for local file uploads#6

Closed
simonw wants to merge 6 commits intomainfrom
claude/add-file-upload-plugin-l3juu
Closed

Add LocalDirectoryStorage for local file uploads#6
simonw wants to merge 6 commits intomainfrom
claude/add-file-upload-plugin-l3juu

Conversation

@simonw
Copy link
Contributor

@simonw simonw commented Jan 26, 2026

  • Add LocalDirectoryStorage class that saves files to a local directory
  • Add /-/files/local/upload/<storage_name> endpoint using request.form()
    for multipart file uploads (leveraging new Datasette multipart support)
  • Update pyproject.toml to depend on datasette branch with file upload
  • Add drag-and-drop upload template for local storage
  • Add comprehensive tests for the new functionality
  • Update README with usage documentation

https://gisthost.github.io/?0668cf2825801f812c3461f033c21af8/index.html

Finished it locally: https://gisthost.github.io/?34d931b3ad0f2bb5151e4f69865f51ec/index.html

claude and others added 6 commits January 26, 2026 03:15
- Add LocalDirectoryStorage class that saves files to a local directory
- Add /-/files/local/upload/<storage_name> endpoint using request.form()
  for multipart file uploads (leveraging new Datasette multipart support)
- Update pyproject.toml to depend on datasette branch with file upload
- Add drag-and-drop upload template for local storage
- Add comprehensive tests for the new functionality
- Update README with usage documentation
- Add register_files_storages hookimpl that reads local-dirs from
  datasette.yaml plugin config
- Users can now configure local directories via:
  plugins.datasette-files.local-dirs array in datasette.yaml
- Each entry takes name, directory, and optional base_url
- Invalid entries (missing name or directory) are skipped
- Add 4 tests for config-based registration
- Update README with config documentation
@simonw
Copy link
Contributor Author

simonw commented Jan 26, 2026

I'm going to land this PR after I push a Datasette alpha with the new file upload mechanism for this to depend on.

@simonw
Copy link
Contributor Author

simonw commented Feb 19, 2026

Abandoned in favour of #7

@simonw simonw closed this Feb 19, 2026
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.

2 participants