npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cordova-plugin-filepickerio

v0.0.9

Published

FileStack plugin for Cordova. Available for Android and iOS.

Downloads

5

Readme

Filepicker.io

Plugin for Cordova to use the native android SDK and the native iOS SDK of FileStack (formerly filepicker.io)

Installing the plugin

cordova plugin add cordova-plugin-filepickerio --save

Using the plugin

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){})

Response format

  • container - container in S3 where the file was stored (if it was stored)
  • url - file link to uploaded file
  • filename - name of file
  • localPath - local path of file // not returned on iOS
  • key - unique key
  • mimetype - mimetype
  • size - size in bytes

note: pick() returns an object, pickMultiple() and pickAndStore() returns an array of objects

Picker options available

  • multiple boolean : Getting multiple files
  • maxFiles integer : Choosing max files
  • maxSize integer : Choosing max files // not supported on iOS
  • services 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 mimetypes

Store options available

  • location string : S3, azure, dropbox, rackspace, gcs
  • path string : Choosing the path "/example/123.png"
  • container string : Bucket
  • access string : public

Security options available

Not implemented yet, feel free to contribute. See native SDK documentation.

Theming

Not implemented yet, feel free to contribute. See native SDK documentation.

Difference between iOS and Android

  • filepicker.setName(name)
  • the maxSize picker options is not supported on iOS
  • the localPath property is not returned on iOS
  • the property picker_options.multiple for the filepicker.pickAndStore() function have different default value. On android, it is false by default. On iOS, it is true.

Full example

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);
    });
}

FAQ

dydl Library not loaded error

If 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:

Donations

If your app is successful or if you are working for a company, please consider donating some beer money :beer::

paypal

Keep in mind that I am maintaining this repository on my free time so thank you for considering a donation. :+1:

Contributing

Thanks for considering contributing to this project.

Finding something to do

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.

Reporting an issue

  • Search existing issues before raising a new one.

  • Include as much detail as possible.

Pull requests

  • 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.

Coding style

  • Try to match the existing indent style.

  • Don't mix platform-specific stuff into the main code.

Licence

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.