Uppy - add meta fields

I noticed the capability to incorporate meta fields in your GitHub demonstration, as shown in this GIF: GitHub - transloadit/uppy: The next open source file uploader for web browsers
I’m interested in modifying filenames and including a meta field for copyright information. Could someone kindly direct me to the relevant documentation or provide a code example for accomplishing this?

Oky I found what I needt.

1 Like

Sorry - I need to ask - But is there any way to shoe meta fields directly under the upload? So user don’t neet do click the edit button?

You can use the 'file-added' event to detect when a file is added by the user, and call uppy.setFileMeta(file.id, {/* your meta properties here */ }) for the metadata to be applied to that file.

@aduh95 Yeah I got that now - But is there any way to add the meta field directly under the thumbnail?
So the user don’t need to press the edit button?

@Messa could you clarify what you have in mind? I’m not sure I understand what you are trying to achieve, and why the 'file-added' event is not what you are looking for.

You can’t modify the UI to include a meta field to the file card, where the file name and such is currently placed unfortunately. In the future we’d like to make composable upload components, but that’s a long-term goal.

@Merlijn to Bad :frowning: maybe some workaround with append() method so loading the fields after dom is loaded?

Or a custom function for a field an trigger in Keyboard File addmeta