directus-interface-uuid-file-image
directus-interface-uuid-file-image copied to clipboard
Interface for your UUID fields to attach file/image from media library, in JSON repeater for example
Installation
Switch to node v18.16.0 (using .nvmrc) :
nvm use
Install and build :
npm ci
npm run build
Then, move the built dist/index.js file into a new directory of your extensions/interfaces, for example extensions/interfaces/uuid-file-image/index.js.
That's it!
If you use docker, don't forget to mount the interfaces volume pointing to the directory containing uuid-file-image/index.js:
volumes:
- ./path/to/local/interfaces:/directus/extensions/interfaces/
Example of usage in a JSON repeater field

To do (next version)
When the file's selected, I currently set in uuid field the filename_disk key of the file.
I wanted this to be set by the user into interface options (props.file_key_to_get: String), but I didn't added it yet in src/index.ts.