Skip to content

Self-hosted personal gallery application with online photo management and albums, supporting Live/Motion Photos, EXIF parsing, geolocation recognition, and an explore map.

fix(upload): import UPLOAD_CHUNK_SIZE from shared utils

Timothy Yin1e2d3bbb51cc
diff --git a/server/api/photos/chunks/[id].ts b/server/api/photos/chunks/[id].ts
index 8bbefa6d..60a2dbf8 100644
--- a/server/api/photos/chunks/[id].ts
+++ b/server/api/photos/chunks/[id].ts
@@ -1,9 +1,9 @@
import { open, stat, rm } from 'node:fs/promises'
+import { UPLOAD_CHUNK_SIZE } from '../../../../shared/utils/upload'
import {
chunkUploads,
chunkHash,
removeChunkUpload,
- UPLOAD_CHUNK_SIZE,
} from '~~/server/utils/chunk-upload'
export default eventHandler(async (event) => {
diff --git a/server/utils/chunk-upload.ts b/server/utils/chunk-upload.ts
index 7e22df06..76659263 100644
--- a/server/utils/chunk-upload.ts
+++ b/server/utils/chunk-upload.ts
@@ -4,7 +4,6 @@ import { tmpdir } from 'node:os'
import path from 'node:path'
import type { StorageProvider } from '../services/storage/interfaces'
-export { UPLOAD_CHUNK_SIZE } from '../../shared/utils/upload'
const TTL = 60 * 60 * 1000
export const chunkUploads = new Map<string, ChunkUpload>()