Fix wildcard mime type, add storage quota#23
Open
0ceanSlim wants to merge 3 commits intosebdeveloper6952:masterfrom
Open
Fix wildcard mime type, add storage quota#230ceanSlim wants to merge 3 commits intosebdeveloper6952:masterfrom
0ceanSlim wants to merge 3 commits intosebdeveloper6952:masterfrom
Conversation
type wildcard handling Features: - Add configurable storage quota per pubkey (default 10GB) - New config option: max_storage_per_pubkey_bytes - Set to 0 or negative to disable quota (unlimited storage) - Add SQL query GetTotalStorageByPubkey to calculate current usage - Storage quota validation before upload with clear error message Fixes: - Fix wildcard mime type handling when "*" is configured - Previously failed with "mime type not allowed" due to charset mismatch - Now properly allows all mime types when wildcard is set - Fix YAML syntax in config files (quote wildcard "*") Technical changes: - Add ValidateStorageQuota method to BlobStorage interface - Add ErrStorageQuotaExceeded error type - Update blob service to track and enforce storage limits - Add allowAll flag to mime type service for wildcard handling - Update config struct with MaxStoragePerPubkeyBytes field Config updates: - Update config.yml with new storage quota option - Update config.example.yml with documentation and fixed syntax
and fix mime type wildcard handling Features: - Add configurable storage quota per pubkey (default 10GB) - New config option: max_storage_per_pubkey_bytes - Set to 0 or negative to disable quota (unlimited storage) - Add SQL query GetTotalStorageByPubkey to calculate current usage - Storage quota validation before upload with clear error message Fixes: - Fix wildcard mime type handling when "*" is configured - Previously failed with "mime type not allowed" due to charset mismatch - Now properly allows all mime types when wildcard is set - Fix YAML syntax in config files (quote wildcard "*") Technical changes: - Add ValidateStorageQuota method to BlobStorage interface - Add ErrStorageQuotaExceeded error type - Update blob service to track and enforce storage limits - Add allowAll flag to mime type service for wildcard handling - Update config struct with MaxStoragePerPubkeyBytes field Config updates: - Update config.yml with new storage quota option - Update config.example.yml with documentation and fixed syntax
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.
I had issues setting a wildcard mime type, so I fixed that. Then I added a storage quota setting to cap the storage per allowed pubkey.