MCPcopy Create free account
hub / github.com/MCSManager/MCSManager / start

Method start

frontend/src/services/uploadService.ts:177–197  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

175 }
176
177 start() {
178 const { execute: uploadFilePiece } = uploadFilePieceApi();
179
180 const formData = new FormData();
181 formData.append("file", this.file.file.slice(this.rangeStart, this.rangeEnd));
182 this.abortController = new AbortController();
183
184 this.worker = uploadFilePiece({
185 url: this.file.pieceUrl,
186 data: formData,
187 params: {
188 offset: this.rangeStart
189 },
190 onUploadProgress: (progressEvent: any) => this.onProgress(progressEvent.loaded),
191 signal: this.abortController.signal
192 })
193 .then(() => this.onCompleted())
194 .catch((e) => this.onError(e));
195
196 this.status = "uploading";
197 }
198
199 stop() {
200 this.status = "stopping";

Callers 1

onErrorMethod · 0.95

Calls 4

onProgressMethod · 0.95
onCompletedMethod · 0.95
onErrorMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected