Filepond: Set files metadata through FilePond.create

Created on 19 Jun 2018  路  6Comments  路  Source: pqina/filepond

Hey its me again! 馃槃

I have another enhancement request. All files which go through my FilePond implementation have a payload which is essentially the file metadata. This metadata lives alongside the file ALWAYS and it provides some extra information which changes the way the file is displayed.

It would be really nice if I could set the metadata of the file through the instance creation with FilePond.create(...). Currently there is the files option holding an array of objects in the format:

{ "source": "server-unique-id", "options": { "type": "'limbo' | 'local' | 'input'" } }

Maybe pass something like this:

{ "source": "server-unique-id", "options": { "type": "'limbo' | 'local' | 'input'", "metadata": { "some": "object" } } }

Which would create the File and set its metadata immediately.

What do you think?

Kind regards,
Denis

All 6 comments

Thanks for the suggestion, I'm currently working on issue #33, this is something I'll add immediately as it's indeed vital for building continuous client/server experience.

Sweet! You know it. 馃槃

As I am digging deeper in filepond, I also realised that I would find file-info view very helpful.

Can you maybe do the same thing you did with the file-status but for file-info for the next release? (I want to display additional information next to the filename).

Just published version 1.8.0, secretly added the createView filter in file-info. Now updating docs and plugins.

{
    source: '1.png',
    options: {
        type: 'local',
        metadata: {
            'foo': 'bar'
        }
    }
}

Release info:
https://twitter.com/rikschennink/status/1009036630307540993

Wow, you are amazing! Thanks. 馃槃

My pleasure!

I can confirm that both: setting metadata and the exposed file-info work nice.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jamesblasco picture jamesblasco  路  4Comments

Chak10 picture Chak10  路  3Comments

irfancnk picture irfancnk  路  7Comments

juongithub picture juongithub  路  7Comments

oldrich-s picture oldrich-s  路  5Comments