GithubHelp home page GithubHelp logo

diegomr86 / filepreviewgenerator Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 2.41 MB

This api endpoint will generate a file preview (thumbnails) from a given url by the fileurl request parameter

License: GNU General Public License v3.0

JavaScript 84.57% PHP 1.33% Dockerfile 14.10%

filepreviewgenerator's Introduction

About

File Preview Generator: A file preview generator

This api endpoint will generate a file preview (thumbnails) from a given url by the fileurl request parameter

Enviroment

You can run/work with this project by using docker or out of container using npm

Install without docker

Install the dependencies first:

depends on 'unoconv':

  $ apt-get install unoconv

depends on 'ffmpeg':

  $ apt-get install ffmpeg

depends on 'ImageMagick':

  $ apt-get install imagemagick

depends on 'curl':

  $ apt-get install curl

To install npm dependencies use:

  $ npm install

Develoment

To run in development must install 'nodemon' in global mode:

  $ npm install nodemon --save

To run in development mode run:

  $ npm run dev

Production

To run in production mode run:

  $ npm run prod

This application use the enviroment variable 'PORT' or the 3000 by default.

Using docker

Go inside the project root folder and create the docker image:

  $ docker build -t filepreviewgenerator

Now just run the project with docker compose

  $ docker-compose up

Now the app will under the port 3000.

Use

To see this in use you can access the app sending a encoded url in fileurl as parameter like this:

http://localhost:3000/?fileurl=https%3A%2F%2Fbloximages.chicago2.vip.townnews.com%2Ftribdem.com%2Fcontent%2Ftncms%2Fassets%2Fv3%2Feditorial%2F3%2F83%2F38384be2-3ba5-11e8-adec-bf48bc62810f%2F5acadc92f3c7d.image.jpg

filepreviewgenerator's People

Contributors

diegomr86 avatar

Watchers

 avatar James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.