Skip to content

Commit 37ff9e8

Browse files
authored
fix: dont send upload request if there are no files to upload (#235)
1 parent 75251fa commit 37ff9e8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/api/upload.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,6 @@ export const uploadSegments = async (routeName: string, segmentStart: number, se
5050
const paths = generateMissingFilePaths(routeInfo, segmentStart, segmentEnd, alreadyUploadedFiles, types)
5151
const pathPresignedUrls = await requestToUploadFiles(routeInfo.dongleId, paths)
5252
const athenaRequests = prepareUploadRequests(paths, pathPresignedUrls)
53+
if (athenaRequests.length === 0) return []
5354
return await uploadFilesToUrls(routeInfo.dongleId, athenaRequests)
5455
}

0 commit comments

Comments
 (0)