Files
upload-gltf/lib/types.ts
T
Tom Boullay 91eaa5d186 fix: replace SHA comparison with file size for LFS compatibility + add NoChangesModal
Git LFS stores pointer files whose SHA differs from the actual blob SHA,
causing false-positive diffs on every upload. Switching to file size
comparison resolves this for LFS-enabled repos.

Also replaces the inline error message with a dedicated NoChangesModal
when no differences are detected, offering cancel (reset) or modify
(close modal) actions.
2026-04-14 14:39:19 +02:00

38 lines
762 B
TypeScript

// ---------------------------------------------------------------------------
// Shared types
// ---------------------------------------------------------------------------
export interface ParsedFile {
filename: string
buffer: Buffer
isModel: boolean
textureName?: string
}
export type FileChange = 'new' | 'changed' | 'unchanged'
export interface FileDiff {
name: string
status: 'changed' | 'new' | 'deleted'
}
export interface RemoteFile {
name: string
size: number
}
export type UploadResponse =
| {
success: true
folderName: string
filesCount: number
compressed: boolean
compressionError?: string
message: string
commitUrl?: string
}
| {
success: false
error: string
}