Giter Site home page Giter Site logo

Comments (6)

rikschennink avatar rikschennink commented on June 8, 2024 1

Can you try turning the file param into an actual file object.

file = new File([file], file.name);

More info here: https://pqina.nl/blog/rename-a-file-with-javascript/

from filepond-plugin-image-transform.

rolandorojas avatar rolandorojas commented on June 8, 2024 1

Adding new File([file], file.name); solves the issue. Thanks!

from filepond-plugin-image-transform.

rikschennink avatar rikschennink commented on June 8, 2024

Are you uploading async using server prop, or using the file-encode plugin? Are you using a custom server.process method?

from filepond-plugin-image-transform.

rolandorojas avatar rolandorojas commented on June 8, 2024

I am using the server.process method to a sync upload the files. I am not using the file-encode plugin.

from filepond-plugin-image-transform.

rikschennink avatar rikschennink commented on June 8, 2024

Are you using a custom process method or URL?

from filepond-plugin-image-transform.

rolandorojas avatar rolandorojas commented on June 8, 2024

Yes, I am using Laravel Livewire to side load the images as soon as they are selected. This process works perfectly unless I try to resize the image.

Below is the exact code I am using. If I set allowImageTransform to false everything works. Otherwise, the file name is lost.


FilePond.registerPlugin(FilePondPluginImageResize);
        FilePond.registerPlugin(FilePondPluginImageTransform);

        pond = FilePond.create($refs.input, {
            allowMultiple: true,
            imageResizeMode: 'contain',
            imageResizeTargetWidth: 1500,
            imageResizeTargetHeight: 1500,
            imageTransformOutputMimeType: 'image/jpeg',
            allowImageTransform: true,
            server: {
                process: (fieldName, file, metadata, load, error, progress, abort, transfer, options) => {
                    window.livewire.find('BnwoZyS7sjEJORZmqBFL').upload('images', file, load, error, progress)
                },
                revert: (filename, load) => {
                    window.livewire.find('BnwoZyS7sjEJORZmqBFL').removeUpload('images', filename, load)
                },
            },
        });

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.