All Projects → filepreviews → filepreviews.js

filepreviews / filepreviews.js

Licence: MIT license
Deprecated: JavaScript client library for the FilePreviews.io service

Programming Languages

javascript
184084 projects - #8 most used programming language
HTML
75241 projects
shell
77523 projects

Projects that are alternatives of or similar to filepreviews.js

wagtail-filepreviews
Extend Wagtail's Documents with image previews and metadata from FilePreviews
Stars: ✭ 21 (-61.11%)
Mutual labels:  filepreviews
filepreviews-node
Node.js client library for the FilePreviews.io service.
Stars: ✭ 19 (-64.81%)
Mutual labels:  filepreviews

⚠️ Deprecated ⚠️

FilePreviews.io

Build Status

JavaScript client library for the FilePreviews.io service.

How to use

Install using bower

bower install filepreviews

Use from our CDN distribution

<script src="https://dufozrddxzwdn.cloudfront.net/2.0.3/filepreviews.min.js"></script>
<script src="https://dufozrddxzwdn.cloudfront.net/2.0.3/filepreviews.js"></script>

Download

You can also download the latest version from the releases page.

Example code

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.

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
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].