Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/filepreviews/filepreviews.js
Deprecated: JavaScript client library for the FilePreviews.io service
https://github.com/filepreviews/filepreviews.js
filepreviews javascript
Last synced: 4 months ago
JSON representation
Deprecated: JavaScript client library for the FilePreviews.io service
- Host: GitHub
- URL: https://github.com/filepreviews/filepreviews.js
- Owner: filepreviews
- License: mit
- Archived: true
- Created: 2014-04-25T18:21:01.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2022-06-01T00:28:15.000Z (over 2 years ago)
- Last Synced: 2024-08-08T08:52:53.332Z (4 months ago)
- Topics: filepreviews, javascript
- Language: JavaScript
- Homepage: http://filepreviews.io
- Size: 107 KB
- Stars: 54
- Watchers: 4
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
**⚠️ Deprecated ⚠️**
# FilePreviews.io
[![Build Status](https://travis-ci.org/GetBlimp/filepreviews.js.svg)](https://travis-ci.org/GetBlimp/filepreviews.js)JavaScript client library for the [FilePreviews.io](http://filepreviews.io) service.
## How to use
#### Install using bower
```
bower install filepreviews
```#### Use from our CDN distribution
```html```
#### Download
You can also download the latest version from the [releases page](https://github.com/GetBlimp/filepreviews.js/releases/).## Example code
```js
var previews = new FilePreviews({
debug: true,
apiKey: 'API_KEY_HERE'
});previews.generate(url, function(err, result) {
console.log(result.id);
console.log(result.status);previews.retrieve(result.id, function(err, result) {
console.log(result);
});
});
```### Options
You can optinally send an options object.
```js
var previews = new FilePreviews({
debug: true,
apiKey: 'CLIENT_API_KEY_HERE'
});var options = {
size: {
width: 250,
height: 250,
},
metadata: ['exif', 'ocr', 'psd'],
format: 'jpg'
}previews.generate(url, options, function(err, result) {
console.log(result.previewURL);
console.log(result.metadata);
});
```## Build
```
$ git clone https://github.com/GetBlimp/filepreviews.js.git
$ cd filepreviews.js
$ npm run build
```## Publish
```
$ npm run publish
```