add schema for box and item
add mobile version for datatable
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
import { AppError } from '@/lib/errors';
|
||||
import fs, { writeFile } from 'fs/promises';
|
||||
import path from 'path';
|
||||
|
||||
@@ -20,10 +19,8 @@ export async function saveFile(key: string, file: Buffer | File) {
|
||||
return key;
|
||||
} catch (error) {
|
||||
console.error(`Error saving file: ${key}`, error);
|
||||
throw new AppError(
|
||||
'FILE_SAVE_ERROR',
|
||||
throw new Error(
|
||||
`Failed to save file: ${error instanceof Error ? error.message : 'Unknown error'}`,
|
||||
500,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user