rc-upload
Advanced tools
Comparing version 4.0.0-alpha.1 to 4.0.0-alpha.2
import React, { Component } from 'react'; | ||
import type { UploadProps, RcFile } from './interface'; | ||
import type { UploadProps, RcFile, BeforeUploadFileType } from './interface'; | ||
interface ParsedFileInfo { | ||
@@ -7,3 +7,3 @@ origin: RcFile; | ||
data: object; | ||
parsedFile: File | Blob | null; | ||
parsedFile: Exclude<BeforeUploadFileType, boolean>; | ||
} | ||
@@ -10,0 +10,0 @@ declare class AjaxUploader extends Component<UploadProps> { |
import type * as React from 'react'; | ||
export declare type BeforeUploadFileType = File | Blob | boolean | string; | ||
export declare type Action = string | ((file: RcFile) => string | PromiseLike<string>); | ||
@@ -21,3 +22,3 @@ export interface UploadProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onError' | 'onProgress'> { | ||
onProgress?: (event: UploadProgressEvent, file: RcFile) => void; | ||
beforeUpload?: (file: RcFile, FileList: RcFile[]) => boolean | Promise<void | File | Blob>; | ||
beforeUpload?: (file: RcFile, FileList: RcFile[]) => BeforeUploadFileType | Promise<void | BeforeUploadFileType>; | ||
customRequest?: (option: UploadRequestOption) => void; | ||
@@ -48,3 +49,3 @@ withCredentials?: boolean; | ||
filename?: string; | ||
file: RcFile | Blob; | ||
file: Exclude<BeforeUploadFileType, File | boolean> | RcFile; | ||
withCredentials?: boolean; | ||
@@ -51,0 +52,0 @@ action: string; |
import React, { Component } from 'react'; | ||
import type { UploadProps, RcFile } from './interface'; | ||
import type { UploadProps, RcFile, BeforeUploadFileType } from './interface'; | ||
interface ParsedFileInfo { | ||
@@ -7,3 +7,3 @@ origin: RcFile; | ||
data: object; | ||
parsedFile: File | Blob | null; | ||
parsedFile: Exclude<BeforeUploadFileType, boolean>; | ||
} | ||
@@ -10,0 +10,0 @@ declare class AjaxUploader extends Component<UploadProps> { |
import type * as React from 'react'; | ||
export declare type BeforeUploadFileType = File | Blob | boolean | string; | ||
export declare type Action = string | ((file: RcFile) => string | PromiseLike<string>); | ||
@@ -21,3 +22,3 @@ export interface UploadProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onError' | 'onProgress'> { | ||
onProgress?: (event: UploadProgressEvent, file: RcFile) => void; | ||
beforeUpload?: (file: RcFile, FileList: RcFile[]) => boolean | Promise<void | File | Blob>; | ||
beforeUpload?: (file: RcFile, FileList: RcFile[]) => BeforeUploadFileType | Promise<void | BeforeUploadFileType>; | ||
customRequest?: (option: UploadRequestOption) => void; | ||
@@ -48,3 +49,3 @@ withCredentials?: boolean; | ||
filename?: string; | ||
file: RcFile | Blob; | ||
file: Exclude<BeforeUploadFileType, File | boolean> | RcFile; | ||
withCredentials?: boolean; | ||
@@ -51,0 +52,0 @@ action: string; |
{ | ||
"name": "rc-upload", | ||
"version": "4.0.0-alpha.1", | ||
"version": "4.0.0-alpha.2", | ||
"description": "upload ui component for react", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
57652
1392