fix(striker-ui): adapt axios progress event change

main
Tsu-ba-me 8 months ago
parent 4c2bf4dbed
commit 237e647cf3
  1. 7
      striker-ui/components/Files/AddFileForm.tsx

@ -92,7 +92,12 @@ const AddFileForm: FC<AddFileFormProps> = (props) => {
(
fileUuid: string,
): AxiosRequestConfig<FormData>['onUploadProgress'] =>
({ loaded, total }) => {
(progressEvent) => {
// Make the ratio 1 when total isn't available; the upload
// limit will prevent progress from reaching 100 until the
// request completes.
const { loaded, total = loaded } = progressEvent;
setUploads((previous) =>
setUploadProgress(
previous,

Loading…
Cancel
Save