You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
When using ChunkedUploady, based on my tests, it's not possible to get details about the server response in case of error inside the useItemErrorListener hook. Instead BatchItem.uploadResponse is always containing the string "At least one chunk failed".
Describe the solution you'd like
From the useItemErrorListener hook, there should be a way to get the server response details easily inside BatchItem.uploadResponse even when using ChunkedUploady (as when uploading without chunks using Uploady). It would also be nice to be able to retrieve the uploadStatus.
Describe alternatives you've considered
The workaround I am currently using is to get and store the server response from the formatServerResponse props and check against it later inside the useItemErrorListener hook but that's quite cumbersome and I don't think it would be that hard to make it accessible for chunked uploads as well looking at the code base:
Additional context
In the project I am currently working on, we are using ChunkedUploady for chunked uploads. We have recently implemented file type filtering on the server side by returning a 400 Bad Request in case of unsupported type. However, when we try to check for this specific case, we can't get either the uploadStatus or the uploadResponse from the BatchItem inside the useItemErrorListener hook.
The text was updated successfully, but these errors were encountered:
hey @alexis-lanoix-sixthfin
thanks for the detailed information. I think its somewhere between a bug and an enhancement :)
In any case, I will look into exposing the error information to the Item so you can retrieve it from the error listener.
Is your feature request related to a problem? Please describe.
When using
ChunkedUploady
, based on my tests, it's not possible to get details about the server response in case of error inside theuseItemErrorListener
hook. InsteadBatchItem.uploadResponse
is always containing the string"At least one chunk failed"
.Describe the solution you'd like
From the
useItemErrorListener
hook, there should be a way to get the server response details easily insideBatchItem.uploadResponse
even when usingChunkedUploady
(as when uploading without chunks usingUploady
). It would also be nice to be able to retrieve theuploadStatus
.Describe alternatives you've considered
The workaround I am currently using is to get and store the server response from the
formatServerResponse
props and check against it later inside theuseItemErrorListener
hook but that's quite cumbersome and I don't think it would be that hard to make it accessible for chunked uploads as well looking at the code base:react-uploady/packages/core/chunked-sender/src/chunkedSender/sendChunks.js
Line 16 in 5005de0
Additional context
In the project I am currently working on, we are using
ChunkedUploady
for chunked uploads. We have recently implemented file type filtering on the server side by returning a 400 Bad Request in case of unsupported type. However, when we try to check for this specific case, we can't get either theuploadStatus
or theuploadResponse
from theBatchItem
inside theuseItemErrorListener
hook.The text was updated successfully, but these errors were encountered: