MCPcopy Index your code
hub / github.com/dataease/SQLBot / upload

Method upload

frontend/src/utils/request.ts:372–387  ·  view source on GitHub ↗
(
    url: string,
    file: File,
    fieldName = 'file',
    config?: FullRequestConfig
  )

Source from the content-addressed store, hash-verified

370
371 // File upload
372 public upload<T = any>(
373 url: string,
374 file: File,
375 fieldName = 'file',
376 config?: FullRequestConfig
377 ): Promise<T> {
378 const formData = new FormData()
379 formData.append(fieldName, file)
380
381 return this.post(url, formData, {
382 headers: {
383 'Content-Type': 'multipart/form-data',
384 },
385 ...config,
386 })
387 }
388
389 // Download file
390 public download(url: string, config?: FullRequestConfig): Promise<Blob> {

Callers 4

cFunction · 0.80
tinymce.min.jsFile · 0.80
uiFunction · 0.80
save_parameter_argsFunction · 0.80

Calls 2

postMethod · 0.95
appendMethod · 0.45

Tested by

no test coverage detected