Skip to content

GET /sharings/drives carries no metadata for a drive whose root is a file #4930

Description

@Crash--

A shared drive can have a single file as its root (drive_root_type: "file"). Clients list those drives from GET /sharings/drives, which returns the sharing documents: the only thing they learn about the file is rules[0].title (its name) and rules[0].mime. Rule (model/sharing/rule.go) carries no size and no dates, and APISharing adds nothing about the shared document.

So every client shows such a row without size and without a date:

  • twake-drive web builds the row from the sharing alone (useTransformFolderListHasSharedDriveShortcuts — name + mime + drive_root_type), and the size column stays empty;
  • twake-drive-mobile has the same gap, and the row also has no date to sort on, so it cannot take part in a sort by date.

The document itself is reachable, but only one request at a time: GET /sharings/drives/<driveId>/<file-id>. Filling a listing of N drives then costs N extra proxied requests, for a recipient each one going to the owner instance.

Could the listing carry the root document, the way a directory listing carries its children? The handler already resolves it (s.GetFileDriveRoot(inst) / GetSharingDir), so ListSharedDrives could include the file document (or at least size, updated_at, class) next to each drive.

Seen on a Twake Drive instance with several file-root drives (.docx, .excalidraw), against both clients.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions