Giter Site home page Giter Site logo

Comments (4)

rpajo avatar rpajo commented on May 28, 2024 2

I have already implemented the file-rename plugin and it works fine now.
Thanks for the clarification.

from filepond-plugin-image-transform.

rikschennink avatar rikschennink commented on May 28, 2024

@rpajo Hi! What do you mean with file metadata? The mime type?

In short, if a file has mime type image/jpeg it should end up with a .jpg extension.

from filepond-plugin-image-transform.

rpajo avatar rpajo commented on May 28, 2024

Hey! My uploaded .jpeg image is saved as .jpg, but in the onFileUpload callback the file extension is still set as the original .jpeg so i get the wrong path due to this extension change.

from filepond-plugin-image-transform.

rikschennink avatar rikschennink commented on May 28, 2024

Now I get it.

This is because a new file is created ( the original file is preserved ) and sent to the server. Suppose the output is forced to image/png then the filename should change as well. But changing the original filename will cause trouble as the file encoding might be different.

I'm not sure how to fix this for now as I don't want to rename the original file.

Two quick temporary solutions:

  • Use the file-rename plugin to rename the file in advance, but this could cause confusion ( as the interface will show a different name then the dropped file )
  • As you're converting to image/jpeg, replace all extensions with .jpg in your onFileUpload callback.

from filepond-plugin-image-transform.

Related Issues (20)

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.