Skip to content

Interface for your UUID fields to attach file/image from media library, in JSON repeater for example

Notifications You must be signed in to change notification settings

stouch/directus-interface-uuid-file-image

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Capture d’écran 2021-11-23 à 09 57 53

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.

About

Interface for your UUID fields to attach file/image from media library, in JSON repeater for example

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published