MCPcopy Create free account
hub / github.com/ScattrdBlade/bigFileUpload / cancelCurrentUpload

Function cancelCurrentUpload

utils/upload.ts:126–141  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

124}
125
126export function cancelCurrentUpload() {
127 if (!isUploading) {
128 return;
129 }
130
131 cancelRequested = true;
132 activeAbortController?.abort();
133 activeXhr?.abort();
134 void Native?.cancelUpload();
135 setUploadState({
136 phase: "cancelled",
137 status: "Upload cancelled.",
138 canCancel: false,
139 percent: 0
140 });
141}
142
143function getUploadTimeoutMs(): number {
144 const value = (settings.store as { uploadTimeoutMs?: number; }).uploadTimeoutMs;

Callers

nothing calls this directly

Calls 1

setUploadStateFunction · 0.85

Tested by

no test coverage detected