Skip to content

Commit 197ec8b

Browse files
committed
WIP
1 parent 7191eb0 commit 197ec8b

File tree

1 file changed

+17
-2
lines changed
  • app/gui/src/project-view/providers/asyncResources

1 file changed

+17
-2
lines changed

app/gui/src/project-view/providers/asyncResources/upload.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ import { QueryClient, useMutation } from '@tanstack/vue-query'
1010
import type { FetchPartialProgress } from './AsyncResource'
1111
import type { ResourceContextSnapshot } from './context'
1212

13+
const IMAGE_UPLOAD_BYTES_LIMIT = 6 * 1000 * 1000
14+
1315
export type AnyUploadSource =
1416
| UploadDefinition
1517
| DragEvent
@@ -125,8 +127,21 @@ export function useResourceUpload(
125127
})
126128
}
127129

128-
async function uploadResourceToCloud(
129-
data: UploadDefinition,
130+
function* partitionForCloudUpload(data: UploadDefinition[]) {
131+
let currentPartition = []
132+
let partitionSize = 0
133+
for (const file of data) {
134+
const contents = await file.data
135+
if (contents.)
136+
137+
}
138+
139+
140+
}
141+
}
142+
143+
async function uploadResourcesToCloud(
144+
data: UploadDefinition[],
130145
asset: Asset,
131146
): Promise<Result<UploadProgress>> {
132147
const directory = getFolderPath(asset.ensoPath)

0 commit comments

Comments
 (0)