fix: issue with not being able to unlink a file from a note (#1836)
This commit is contained in:
@@ -4,7 +4,8 @@ import { DecryptedPayloadInterface } from '../../Abstract/Payload/Interfaces/Dec
|
||||
import { FileMetadata } from './FileMetadata'
|
||||
import { FileProtocolV1 } from './FileProtocolV1'
|
||||
import { SortableItem } from '../../Runtime/Collection/CollectionSort'
|
||||
import { ConflictStrategy } from '../../Abstract/Item'
|
||||
import { ConflictStrategy, ItemInterface } from '../../Abstract/Item'
|
||||
import { ContentType } from '@standardnotes/common'
|
||||
|
||||
type EncryptedBytesLength = number
|
||||
type DecryptedBytesLength = number
|
||||
@@ -31,6 +32,8 @@ export type FileContentSpecialized = FileContentWithoutSize & FileMetadata & Siz
|
||||
|
||||
export type FileContent = FileContentSpecialized & ItemContent
|
||||
|
||||
export const isFile = (x: ItemInterface): x is FileItem => x.content_type === ContentType.File
|
||||
|
||||
export class FileItem
|
||||
extends DecryptedItem<FileContent>
|
||||
implements FileContentWithoutSize, Sizes, FileProtocolV1, FileMetadata, SortableItem
|
||||
|
||||
Reference in New Issue
Block a user