+
+
+ [{{ 1 + uprogress.fileidx }}/{{ uprogress.filestart.length }}]
+
+ {{ uprogress.filename }}
+
+ {{ (uprogress.filepos / uprogress.filesize * 100).toFixed(0) }} %
+
+
+
+ {{ (uprogress.uploaded / 1e6).toFixed(0) }} / {{ (uprogress.total / 1e6).toFixed(0) }} MB
+
+ {{ speed.toFixed(speed < 100 ? 1 : 0) }} MB/s
+
+
+
+
+
diff --git a/cista-front/src/stores/documents.ts b/cista-front/src/stores/documents.ts
index 8628724..59662d0 100644
--- a/cista-front/src/stores/documents.ts
+++ b/cista-front/src/stores/documents.ts
@@ -82,29 +82,6 @@ export const useDocumentStore = defineStore({
)
this.document = docs as Document[]
},
- updateUploadingDocuments(key: number, progress: number) {
- for (const d of this.uploadingDocuments) {
- if (d.key === key) d.progress = progress
- }
- },
- pushUploadingDocuments(name: string) {
- this.uploadCount++
- const document = {
- key: this.uploadCount,
- name: name,
- progress: 0
- }
- this.uploadingDocuments.push(document)
- return document
- },
- deleteUploadingDocument(key: number) {
- this.uploadingDocuments = this.uploadingDocuments.filter(e => e.key !== key)
- },
- updateModified() {
- for (const d of this.document) {
- if ('mtime' in d) d.modified = formatUnixDate(d.mtime)
- }
- },
login(username: string, privileged: boolean) {
this.user.username = username
this.user.privileged = privileged
diff --git a/cista/api.py b/cista/api.py
index d7d17b8..38b16d1 100644
--- a/cista/api.py
+++ b/cista/api.py
@@ -46,6 +46,7 @@ async def upload(req, ws):
raise ValueError(f"Expected {req.end - pos} more bytes, got {d}")
# Report success
res = StatusMsg(status="ack", req=req)
+ print("ack", res)
await asend(ws, res)