File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed
src/Pages/Applications/DevtronApps/Details/CIPipeline Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change 1
- import { MutableRefObject } from 'react'
2
-
3
1
import { ROUTES } from '@Common/Constants'
4
2
import { getIsRequestAborted , post } from '@Common/Api'
5
3
import { getUrlWithSearchParams , showError } from '@Common/Helper'
6
- import { UploadFileDTO } from '@Shared/types'
4
+ import { UploadFileDTO , UploadFileProps } from '@Shared/types'
5
+ import { APIOptions } from '@Common/Types'
7
6
8
7
export const uploadCIPipelineFile = async ( {
9
8
file,
@@ -14,14 +13,11 @@ export const uploadCIPipelineFile = async ({
14
13
maxUploadSize,
15
14
abortControllerRef,
16
15
} : {
17
- file : File [ ]
18
16
appId : number
19
17
ciPipelineId : number
20
18
envId ?: number
21
- allowedExtensions ?: string [ ]
22
- maxUploadSize ?: number
23
- abortControllerRef ?: MutableRefObject < AbortController >
24
- } ) : Promise < UploadFileDTO > => {
19
+ } & UploadFileProps &
20
+ Pick < APIOptions , 'abortControllerRef' > ) : Promise < UploadFileDTO > => {
25
21
const formData = new FormData ( )
26
22
formData . append ( 'file' , file [ 0 ] )
27
23
You can’t perform that action at this time.
0 commit comments