File sharing
This commit is contained in:
@@ -19,10 +19,23 @@ export function download_blob(blob: Blob, file_name: string) {
|
||||
setTimeout(() => URL.revokeObjectURL(url), 60_000);
|
||||
}
|
||||
|
||||
export interface ShareEntry {
|
||||
id: string;
|
||||
// The link secret encrypted with the master key
|
||||
secret: string;
|
||||
}
|
||||
|
||||
// What the files API returns, size is of the encrypted file
|
||||
export interface FileEntry {
|
||||
id: string;
|
||||
date_created: string;
|
||||
size: number;
|
||||
metadata: string;
|
||||
share: ShareEntry | null;
|
||||
}
|
||||
|
||||
// What the public shares API returns, metadata is encrypted with the link secret
|
||||
export interface SharedFileEntry {
|
||||
size: number;
|
||||
metadata: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user