Open
Description
After debugging a cordova instance of a web app, we ran into an issue with the file uploader, we found the error to be in the AjaxUploader.tsx
Here is the patch that we had to apply to fix the issue:
diff --git a/node_modules/rc-upload/es/AjaxUploader.js b/node_modules/rc-upload/es/AjaxUploader.js
index 34509ce..2d5a577 100644
--- a/node_modules/rc-upload/es/AjaxUploader.js
+++ b/node_modules/rc-upload/es/AjaxUploader.js
@@ -219,13 +219,15 @@ var AjaxUploader = /*#__PURE__*/function (_Component) {
// Not sure if this will work since no related test case works with it
(_typeof(transformedFile) === 'object' || typeof transformedFile === 'string') && transformedFile ? transformedFile : file;
- if (parsedData instanceof File) {
- parsedFile = parsedData;
- } else {
- parsedFile = new File([parsedData], file.name, {
- type: file.type
- });
- }
+ parsedFile = parsedData;
+
+ // if (parsedData instanceof File) {
+ // parsedFile = parsedData;
+ // } else {
+ // parsedFile = new File([parsedData], file.name, {
+ // type: file.type
+ // });
+ // }
mergedParsedFile = parsedFile;
mergedParsedFile.uid = file.uid;
Screenshots
Here is the debug point that triggered the parsed file change:
The mergedParsedFile's name becomes a [File]
and the reset of the object is malformated:
Setup
antd: v4.16.2
Platform: Android 8.1
Cordova: v10
Cordova Android: v9
Metadata
Metadata
Assignees
Labels
No labels