Add LocalDirectoryStorage for local file uploads#6
Closed
Conversation
- 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
Contributor
Author
|
I'm going to land this PR after I push a Datasette alpha with the new file upload mechanism for this to depend on. |
Contributor
Author
|
Abandoned in favour of #7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
for multipart file uploads (leveraging new Datasette multipart support)
https://gisthost.github.io/?0668cf2825801f812c3461f033c21af8/index.html
Finished it locally: https://gisthost.github.io/?34d931b3ad0f2bb5151e4f69865f51ec/index.html