Parsed File shape is incorrect on certain platforms
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- react, typescript
- Domain
- frontend, mobile-dev
Research direction
Start with src/AjaxUploader.tsx and inspect how parsedData becomes parsedFile and mergedParsedFile. Compare that flow with the supplied patch, then reproduce or investigate it on the listed Android/Cordova setup; done means the uploader preserves the parsed file shape and metadata on affected platforms.
Written by the indexing model from the issue text.
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
- Dominant language
- TypeScript
- Stars
- 804
- Forks
- 323
- Avg merge
- 12m
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from react-component/upload
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
react-component/upload#170 ·
-
HVAC website Open
Difficulty 5/5 Over a week Newbie friendliness 10/100
react-component/upload#697 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 15/100
react-component/upload#615 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
react-component/upload#522 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
react-component/upload#515 ·
All issues in react-component/upload
Similar issues
-
Browser Waiting for: Product Owner
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
getsentry/sentry-javascript#24577 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
agilepathway/label-checker#640 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
copse-dev/agent-pane#2953 ·
-
agentic-workflows
Difficulty 1/5 Under an hour Newbie friendliness 85/100
githubnext/rig#534 ·
-
automation missing-model model-sync provider:pioneer
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
anomalyco/models.dev#7701 ·