Upload sessions – system description
The session table, list filters and scope, and the deletion steps: part file, cancelling the Drive session, deleting the row.
Review and clean-up of the sessions of interrupted chunked, large and direct Drive uploads, protecting the web hosting space limit.
Data model
Table names carry the installation's own prefix in the database.
| Table | Role |
|---|---|
upload_session | session: purpose (iphone_backup, document_large, document_drive), state (open, complete, aborted, expired), offset, size, company, user; owner: the phone backup model |
Process
- List: filter by purpose and state; a completed Drive session is flagged separately; a message if the schema is missing.
- Delete: id format (32 hex); the local
.partfile is deleted (freed bytes), an open Drive resumable session is cancelled (cancelResumable), then the row is deleted; the file of a completed Drive upload stays on the Drive.
Permissions
- Function rights:
list(UNMAPPED),delete,debug. - Content scope: list
getAllowedCompanyIds; deletesessionInScope(super admin everything; for a row without company only one's own).