Index

Upload

MMO.edms · 1 symbol · generated 5 Oct 2026

class

Upload

edms.js:302

A file sent a chunk at a time: the server says where it stopped, the next chunk goes from there. A chunk that failed (the network, the server) is sent again, a few times; one the server did not expect (409) resumes where the server says.

class MMO.edms.Upload
Namespace
MMO.edms
const upload = new MMO.edms.Upload(MMO.edms.Api.Shared(), file, {labels: '"#invoices"', onProgress: (u) => bar.value = u.progress}); upload.send().then((answer) => console.log(answer.file.id));

Properties1

progress

readonlyaccessoredms.js:331
get progress()
Type
number

Methods6

constructor(api, file, {name = null, labels = [], attachment = null, temporary = false, onProgress = null})

edms.js:310
constructor(api, file, {name = null, labels = [], attachment = null, temporary = false, onProgress = null} = {})
apiMMO.edms.Api
fileFile | Blob
{name = null, labels = [], attachment = null, temporary = false, onProgress = null} = {}

send()

edms.js:336
send()
returnsPromise<Object>the last answer: file (the file made), or the upload's id for a temporary one

abort()

edms.js:350

Stop the upload: what the server received is deleted

abort()

sendChunk(start, end, signal)

asyncedms.js:380
async sendChunk(start, end, signal)
start
end
signal