ant-design-pro

Using customRequest in Ant design file upload

限于喜欢 提交于 2021-01-21 06:01:23
问题 I am using Axios to handle the file upload. I am facing a problem showing the upload progress of the file upload. The file upload view I am using is "picture-card". HTML <Upload accept="image/*" customRequest={uploadImage} onChange={handleOnChange} listType="picture-card" fileList={defaultListOfFiles} className="image-upload-grid" > {defaultListOfFiles.length >= 8 ? null : <div>Upload Button</div>} </Upload> OnChangeHandler const handleOnChange = ({ file, fileList, event }) => { console.log

Using customRequest in Ant design file upload

送分小仙女□ 提交于 2021-01-21 06:00:54
问题 I am using Axios to handle the file upload. I am facing a problem showing the upload progress of the file upload. The file upload view I am using is "picture-card". HTML <Upload accept="image/*" customRequest={uploadImage} onChange={handleOnChange} listType="picture-card" fileList={defaultListOfFiles} className="image-upload-grid" > {defaultListOfFiles.length >= 8 ? null : <div>Upload Button</div>} </Upload> OnChangeHandler const handleOnChange = ({ file, fileList, event }) => { console.log