
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
angular-filepicker
Advanced tools
Filepicker library for AngularJS. It is simple wrapper of filepicker JS library.
OR
bower install angular-filepicker and include scripts<script type="text/javascript" src="bower_components/filepicker-js/dist/filepicker.js"></script>
<script type="text/javascript" src="bower_components/angular-filepicker/dist/angular_filepicker.js"></script>
'angular-filepicker' module as dependency for your angular app. Example:angular.module('angularFilepickerExample', ['ngRoute', 'angular-filepicker'])
filepickerProvider.setKey method. This way key will be set in configuration phase.angular.module('angularFilepickerExample')
.config(function (filepickerProvider) {
filepickerProvider.setKey('yourAPIKEY');
});
filepickerService.setKey method.data-fp-apikey directive attribute.filepicker directive or filepickerServicefilepickerServicefilepickerService is wrapper on window.filepicker global. Avaliable methods: setKey, pick, pickFolder, pickMultiple, pickAndStore, read, write, writeUrl, export, processImage, store, storeUrl, stat, metadata, remove, convert, constructWidget, makeDropPane. See detailed docs
Example of using service in the controller:
angular.module('angularFilepickerExample')
.controller('GalleryCtrl', function ($scope, filepickerService, $window) {
$scope.files = JSON.parse($window.localStorage.getItem('files') || '[]');
$scope.pickFile = pickFile;
$scope.onSuccess = onSuccess;
function pickFile(){
filepickerService.pick(
{mimetype: 'image/*'},
onSuccess
);
};
function onSuccess(Blob){
$scope.files.push(Blob);
$window.localStorage.setItem('files', JSON.stringify($scope.files));
};
});
filepicker directiveIt allows you to use filepicker widgets in angular templates. It support all attributes from the docs, the only diffrence is use of on-success instead of onchage. Directive restricts attribute mode.
Avaliable widtet types: filepicker, filepicker-dragdrop, filepicker-convert.
Example:
<input filepicker type="filepicker-dragdrop" data-fp-services="computer,facebook,dropbox,box" on-success="onSuccess(event.fpfile)" />;
filepicker-preview directiveIt is equivalent of embedded filepicker viewer widget docs. Directive restricts attribute mode.
The only attribute is url . Must be filepicker type link.
Example:
<div filepicker-preview url="previewUrlExample" style="width:90%; height:500px"></div>
fpConvert filterGive nice an easy way to benefit from filepicker images conversion. Usefull if you need thumbnail or crop image. Example (image resized to width=200)
<img ng-src="{{filepickerLink | fpConvert: {w:200} }}">
Other conversion options:
Detailed docs
Demo avaliable in the /demo directory. To run demo on localhost:
npm install
npm run serve
Local server will be launched http://localhost:8080/demo/
Contributing welcomed. To build dist run:
npm install
npm build
MIT
FAQs
AngularJS bindings for Filepicker js library
The npm package angular-filepicker receives a total of 8,781 weekly downloads. As such, angular-filepicker popularity was classified as popular.
We found that angular-filepicker 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
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.