Giter VIP home page Giter VIP logo

filepond-server-php's Introduction

FilePond PHP Server API

A PHP server to handle FilePond file uploads and Doka image transforms.

โš ๏ธ If you're using a version of the PHP API released before 2019-09-19, please update to the latest version to fix a potential security vulnerability

Instructions

Comment this line in both the index.php and submit.php files to prevent posting to the server from other domains.

header('Access-Control-Allow-Origin: *');

Targets

The tmp and upload file paths can be configured in the config.php file.

// where to get files from, can also be an array of fields
const ENTRY_FIELD = 'filepond'; 

// where to write files to
const TRANSFER_DIR = 'tmp';
const UPLOAD_DIR = 'uploads';
const VARIANTS_DIR = 'variants';

// name to use for the file metadata object
const METADATA_FILENAME = '.metadata';

Image Transforms

To do image transforms on the server instead of the client we can uncomment the require_once('config_doka.php') line.

Transform instructions found in the .metadata file are now automatically applied to the first file in the upload list (when it's transfered from the transfer dir to the upload dir).

Example

See FilePond PHP Boiler Plate for an example implementation.

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.