In React Native 0.81, in all environments on a Vivo S7 running Android 10, attachments cannot be uploaded through the file manager. I hope the author can take a look and fix this bug as soon as possible.
I have searched open and closed issues for this issue.
- [x] I have searched open and closed issues.
I have read and understood the license (link below).
- [x] I have read and understood the license.
Minimal reproducible example
steps: Click "Upload Attachment" to enter the mobile management page. You can upload files or images normally by selecting them directly from the current page. However, if you click "More" in the top-left corner and choose "File Manager," then select any file in the file manager, you cannot upload it—this includes images, DOC files, and PDF files
What platform(s) does this occur on?
Android
Did you reproduce on a real device or emulator / simulator?
real device
Steps to reproduce
vivo S7
Processor: 2.4GHz Qualcomm Snapdragon 765G, octa-core
Model: V2020A
Hardware version: MP_0.4
Software version: PD2020_A_7.11.0
Operating system: Android 10
real code:
let res = (await pick({ type: [types.allFiles], allowMultiSelection: true, })) ?? []
import { pick, types } from '@react-native-documents/picker'
steps: Click "Upload Attachment" to enter the mobile management page. You can upload files or images normally by selecting them directly from the current page. However, if you click "More" in the top-left corner and choose "File Manager," then select any file in the file manager, you cannot upload it—this includes images, DOC files, and PDF files
After selecting a DOC file or any other file from that path, the returned res result is For an array of objects, the object property is { "error": "Could not read file metadata", "convertibleToMimeTypes": null, "isVirtual": null, "nativeType": "application/msword", "size": null, "type": "application/msword", "uri": "content://media/external/file/52970", "name": null, "hasRequestedType": true }
If the issue is related to specific file(s), I have linked the files so that others can reproduce exactly what I see.
- [x] I have attached files necessary to reproduce the problem (if applicable).
Stacktrace of the crash (if applicable)
{
"error": "Could not read file metadata",
"convertibleToMimeTypes": null,
"isVirtual": null,
"nativeType": "application/msword",
"size": null,
"type": "application/msword",
"uri": "content://media/external/file/52970",
"name": null,
"hasRequestedType": true
}
Your computer environment
vivo S7
Processor: 2.4GHz Qualcomm Snapdragon 765G, octa-core
Model: V2020A
Hardware version: MP_0.4
Software version: PD2020_A_7.11.0
Operating system: Android 10
The issue can be reproduced in all environments except the local environment.