Secure WebView Downloads


Feature Request: Native Auto-Deletion / TTL for Private Storage Files

Description: Provide a built-in mechanism to automatically delete files from Private Storage after a specified duration (Time To Live).

Problem Statement: Currently, when handling secure file downloads in restrictive environments like Android WebViews, developers must upload files to private storage and generate signed URLs because Blob URLs are often unsupported. Cleaning up these temporary files currently requires manual implementations (e.g., using setTimeout with a backend function), which is unreliable if the client session ends or a process is interrupted. This leads to orphaned files in private storage, which is both a security risk and a storage management issue.

Proposed Solution: Add an optional expires_in or ttl parameter (in seconds/minutes) to the UploadPrivateFile integration. When specified, the platform should automatically and permanently delete the file from the storage bucket once the duration has passed.

Target Use Cases:

  1. Secure WebView Downloads: Serving temporary files via signed URLs in environments where Blob URLs fail.

  2. Temporary Report Generation: Automating the cleanup of one-time data exports or PDF reports.

  3. Sensitive Data Handling: Ensuring short-lived sensitive documents are guaranteed to be removed without manual intervention.

Benefits:

  • Enhanced Security: Guarantees the removal of temporary sensitive data.

  • Storage Efficiency: Automatically prevents the accumulation of "garbage" files.

  • Developer Experience: Simplifies the workflow for handling cross-platform file management and reduces the need for custom cleanup logic.


Please authenticate to join the conversation.

Upvoters
Status

In Review

Board
πŸ’‘

Feature Request

Date

4 days ago

Author

אבף ΧžΧΧ•Χ¨

Subscribe to post

Get notified by email when there are changes.