feat: granular file access audit logging (viewed/opened/downloaded)
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
Some checks failed
Build and Push Docker Image / build (push) Has been cancelled
Replace single FILE_DOWNLOADED action with three granular actions: - FILE_VIEWED: inline preview loaded in the UI - FILE_OPENED: file opened in a new browser tab - FILE_DOWNLOADED: explicit download button clicked Add 'purpose' field to getDownloadUrl input (preview/open/download). All client callers updated to pass the appropriate purpose. Audit page updated with new filter options and color mappings. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -146,7 +146,7 @@ export default function BulkUploadPage() {
|
||||
const handleViewFile = useCallback(
|
||||
async (bucket: string, objectKey: string) => {
|
||||
try {
|
||||
const { url } = await utils.file.getDownloadUrl.fetch({ bucket, objectKey })
|
||||
const { url } = await utils.file.getDownloadUrl.fetch({ bucket, objectKey, purpose: 'open' as const })
|
||||
window.open(url, '_blank')
|
||||
} catch {
|
||||
toast.error('Failed to open file. It may have been deleted from storage.')
|
||||
|
||||
Reference in New Issue
Block a user