
Security News
The Changelog Podcast: Practical Steps to Stay Safe on npm
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.
cordova-plugin-filepickerio
Advanced tools
FileStack plugin for Cordova. Available for Android and iOS.
Plugin for Cordova to use the native android SDK and the native iOS SDK of FileStack (formerly filepicker.io)
cordova plugin add cordova-plugin-filepickerio --save
The plugin creates the object window.filepicker with the following functions available:
filepicker.setKey(key)filepicker.setName(app_name)filepicker.pick(picker_options, onSuccess(Blob){}, onError(FPError){})filepicker.pickMultiple(picker_options, onSuccess(Blobs){}, onError(FPError){})filepicker.pickAndStore(picker_options, store_options, onSuccess(Blobs){}, onError(FPError){})container - container in S3 where the file was stored (if it was stored)url - file link to uploaded filefilename - name of filelocalPath - local path of file // not returned on iOSkey - unique keymimetype - mimetypesize - size in bytesnote: pick() returns an object, pickMultiple() and pickAndStore() returns an array of objects
multiple boolean : Getting multiple filesmaxFiles integer : Choosing max filesmaxSize integer : Choosing max files // not supported on iOSservices array of strings : Choosing services {"GALLERY", "CAMERA", "FACEBOOK", "CLOUDDRIVE", "DROPBOX", "BOX", "GMAIL", "INSTAGRAM", "FLICKR", "PICASA", "GITHUB", "GOOGLE_DRIVE", "EVERNOTE", "SKYDRIVE"}mimeTypes array of strings : Choosing mimetypeslocation string : S3, azure, dropbox, rackspace, gcspath string : Choosing the path "/example/123.png"container string : Bucketaccess string : publicNot implemented yet, feel free to contribute. See native SDK documentation.
Not implemented yet, feel free to contribute. See native SDK documentation.
filepicker.setName(name)maxSize picker options is not supported on iOSlocalPath property is not returned on iOSpicker_options.multiple for the filepicker.pickAndStore() function have different default value. On android, it is false by default. On iOS, it is true.A full example could be:
function pickFile() {
window.filepicker.setKey('APP KEY');
window.filepicker.setName('APP NAME');
window.filepicker.pickAndStore({
multiple: true,
mimeTypes: ['image/*', 'application/pdf'],
services : [ 'CAMERA', 'GALLERY', 'GOOGLE_DRIVE', 'DROPBOX', 'BOX', 'SKYDRIVE'],
maxFiles: 20,
maxSize: (10*1024*1024)
}, {
location : 'S3',
path : '/location/'
}, function(res) {
console.log(res);
}, function(e) {
console.error(e);
});
}
dydl Library not loaded errorIf you get the following error when launching your app:
dyld: Library not loaded: .framework/FSPicker
Reason: image not found
Make sure that the frameworks are correctly embedded in Xcode:
If your app is successful or if you are working for a company, please consider donating some beer money :beer::
Keep in mind that I am maintaining this repository on my free time so thank you for considering a donation. :+1:
Thanks for considering contributing to this project.
Ask, or pick an issue and comment on it announcing your desire to work on it. Ideally wait until we assign it to you to minimize work duplication.
Search existing issues before raising a new one.
Include as much detail as possible.
Make it clear in the issue tracker what you are working on, so that someone else doesn't duplicate the work.
Use a feature branch, not master.
Rebase your feature branch onto origin/master before raising the PR.
Keep up to date with changes in master so your PR is easy to merge.
Be descriptive in your PR message: what is it for, why is it needed, etc.
Make sure the tests pass
Squash related commits as much as possible.
Try to match the existing indent style.
Don't mix platform-specific stuff into the main code.
The MIT License
Copyright (c) 2016 Didier Baquier
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
FAQs
FileStack plugin for Cordova. Available for Android and iOS.
We found that cordova-plugin-filepickerio demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.

Security News
Ruby's creator Matz assumes control of RubyGems and Bundler repositories while former maintainers agree to step back and transfer all rights to end the dispute.