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
{{ message }}
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.
Issue: Only jpg files can be detected by the plugin, other file extensions won't show up (pdf, docx, pptx, etc)
Code:
public openCustomFilesPicker() {
let extensions = [];
if (Application.ios) {
extensions = [kUTTypePDF, kUTTypeText]; // you can get more types from here: https://developer.apple.com/documentation/mobilecoreservices/uttype
} else {
extensions = ["pdf", "jpg"];
}
let options: FilePickerOptions = {
android: {
extensions: extensions,
maxNumberFiles: 1,
},
ios: {
extensions: extensions,
multipleSelection: true,
hostView: this._hostView,
},
};
let mediafilepicker = new Mediafilepicker();
mediafilepicker.openFilePicker(options);
mediafilepicker.on("getFiles", function (res) {
let results = res.object.get("results");
console.dir(results);
if (results) {
for (let i = 0; i < results.length; i++) {
let result = results[i];
console.log(result.file);
}
}
});
mediafilepicker.on("error", function (res) {
let msg = res.object.get("msg");
console.log(msg);
});
mediafilepicker.on("cancel", function (res) {
let msg = res.object.get("msg");
console.log(msg);
});
}
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Issue: Only jpg files can be detected by the plugin, other file extensions won't show up (pdf, docx, pptx, etc)
Code:
The text was updated successfully, but these errors were encountered: