How to use the filepond.FileOrigin.INPUT function in filepond

To help you get started, we’ve selected a few filepond examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github unite-cms / unite-cms / src / Bundle / MediaBundle / Resources / assets / vue / components / Fields / Form / MediaFile.vue View on Github external
const fileValueToMutationValue = function(value) {

    // File is already uploaded, we just need to return the uuid of the file for unite.
    if(value.origin === FileOrigin.LOCAL) {
      return value.serverId;
    }

    // File is a new input, so we need to pass the upload token, created by unite cms.
    else if(value.origin === FileOrigin.INPUT) {
      return value.getMetadata('uniteInformation').token;
    }

    throw "Invalid file origin";
  };

filepond

FilePond, Where files go to stretch their bits.

MIT
Latest version published 9 days ago

Package Health Score

83 / 100
Full package analysis