🐛 Fix size for direct root upload / URL uploads / versions (#830)
This commit is contained in:
@@ -305,6 +305,13 @@ class FileUploadService {
|
|||||||
callback?: (file: { root: string; file: FileType | null }, context: any) => void;
|
callback?: (file: { root: string; file: FileType | null }, context: any) => void;
|
||||||
},
|
},
|
||||||
): Promise<PendingFileType[]> {
|
): Promise<PendingFileType[]> {
|
||||||
|
// if we're uploading one file directly, do the size calc first
|
||||||
|
for (const file of fileList) {
|
||||||
|
if (file.root && file.file?.name && file.root === file.file.name) {
|
||||||
|
this.rootSizes[file.root] = file.file.size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const { companyId } = RouterServices.getStateFromRoute();
|
const { companyId } = RouterServices.getStateFromRoute();
|
||||||
|
|
||||||
if (!fileList || !companyId) {
|
if (!fileList || !companyId) {
|
||||||
|
|||||||
Reference in New Issue
Block a user