Repository navigation
feat: 6738 enforce geospatial upload and preview limits - #7116
Draft
ihar-tsykala wants to merge 10 commits into
Draft
ihar-tsykala wants to merge 10 commits into
ihar-tsykala wants to merge 10 commits into
Conversation
Signed-off-by: Ihar Tsykala <ihar.tsykala@hashgraph.com>
…load Signed-off-by: Ihar Tsykala <ihar.tsykala@hashgraph.com>
Signed-off-by: Ihar Tsykala <ihar.tsykala@hashgraph.com>
…w marker Signed-off-by: Ihar Tsykala <ihar.tsykala@hashgraph.com>
Signed-off-by: Ihar Tsykala <ihar.tsykala@hashgraph.com>
Signed-off-by: Ihar Tsykala <ihar.tsykala@hashgraph.com>
Signed-off-by: Ihar Tsykala <ihar.tsykala@hashgraph.com>
…-positive geoFile detection Signed-off-by: Ihar Tsykala <ihar.tsykala@hashgraph.com>
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.
Description:
Large geospatial files could freeze the browser or fail without a useful message. KML and KMZ were not handled consistently, the original upload was lost after conversion to GeoJSON, and the server did not enforce the browser's limits.
This change adds shared configurable limits for GeoJSON, KML and KMZ. Files above the preview limit can be stored without rendering, while files above the maximum are rejected. The original file is kept in IndexedDB before submit and in GridFS and IPFS afterwards. GeoJSON and KML use lossless gzip storage, KMZ remains unchanged, and downloads return the original bytes. Server validation checks the real stored content of every link inside a GeoJSON value and logs rejections and accepted no-preview uploads. If a draft is opened where its file is not available, the field asks to import it again. A failed upload before submit is rolled back for tables and geo files alike. The IPFS transformation addon passes the stored geo file to external systems as a link or base64, the same way it passes table files. Existing documents without a file link, and forms without geo files, continue to work as before.
The common cross-service upload transport is deliberately unchanged. Its JSON expansion for large files remains tracked separately.
Fixes #6738
Checklist