File Upload and File Access Logs
Tracking File Uploads and Access in Tadabase
Tadabase logs every file uploaded and accessed within your application, ensuring that you can track both file uploads and secure file downloads. This guide will walk you through accessing these logs and understanding the details that are tracked.
What are Secure Files? Secure files are protected files that can only be accessed from within your app or the Tadabase Builder. They use time-limited signed URLs (expire after 10 minutes) and are stored in private S3 buckets. Every access to a secure file is logged with comprehensive details including user information, IP address, location, and device information.
Accessing File Logs
To view file logs, follow these steps:
- Go to Settings.
- Select Logs.
- Click on File Logs.
The file logs provide visibility into every uploaded file and each time a secure file is downloaded.
File Upload Log Information
Each file upload is logged with the following details:
Basic Information:
- File Name: The name of the uploaded file.
- Type: The file type (e.g., PDF, JPEG, etc.).
- Upload At: The date and time the file was uploaded.
- Uploaded By: The user who uploaded the file.
- Table: The table where the file was uploaded.
- Field: The field within the table where the file is stored.
- Record ID: The unique ID of the associated record.
- Size: The file size.
- Secure: Whether the file is marked as secure.
- Status: Indicates whether the upload was successful.
Special Cases:
There may be instances where the Record ID is missing. For example, if a file is uploaded through a form that is not submitted, the upload will still be logged, but it won’t be associated with a record.
Secure File Download Log Information
For files marked as Secure, additional logging occurs when a file is downloaded. Secure files use time-limited signed URLs that expire after 10 minutes, ensuring enhanced security. The following details are tracked:
- File Name: The name of the downloaded file.
- Source: The source of the download (e.g., a specific page or component).
- Download At: The date and time the file was downloaded.
- Accessed By: The user who accessed the file (if logged in).
- Table: The table where the file is stored.
- Field: The field associated with the file.
- Record ID: The unique ID of the associated record.
- IP: The IP address from which the file was accessed.
- Location: Geographic location information associated with the access.
- Device Information: Details about the device used to access the file.
Each time a secure file signature is generated for viewing, it is logged, ensuring that all access points are tracked.
Secure File Access Controls
Secure files offer enhanced access control options beyond basic security. When configuring a secure file field, you can apply additional restrictions to control who can download files:
- Restrict by Logged-In User Field: Limit access to users directly connected to the file via a field that links to the Users table. For example, only the user who uploaded the file can download it.
- Restrict by Logged-In Role: Allow only users with specific roles (e.g., Admin, Manager) to download the file.
- Restrict by Role or Field (OR Logic): Combine both restrictions using OR logic, allowing access to either the connected user or users with a specified role. This is ideal for scenarios like "Only the file owner or an Admin can access this file."
Important Notes:
- Secure files are stored in private S3 buckets for enhanced security
- The "Secured" setting cannot be changed once a field is created
- Secure files are not compatible with Dropbox storage
- If you share links to secured files outside the app, they will not work - users must download from within the application
- Access restrictions only apply to secure files and do not override access restrictions defined in the builder
Displaying Logs on the App Side
Similar to other logs, you can display file upload and access logs directly within your app. This allows you to filter logs based on criteria such as specific fields, records, or tables. For more details, refer to the "Add Logs to App" article for instructions on how to implement this in your app.
We'd love to hear your feedback.