Skip to content

N3rdArtiste/directus-svg-to-code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

directus-svg-to-code

Directus extension hook to get svg code from svg files

Steps:

  1. First install the package "npm install directus-custom-hook-svg-to-code"
  2. create a file "extensions/hooks/svg-to-code/index.js"
  3. put var e = require('directus-custom-hook-svg-to-code'); module.exports = e; in that index.js file
  4. Start directus.
  5. Go to Settings>Data Model>System Collections(drop down)>Directus Files
  6. Create a new field with key "svg_code" and type "text". Also, make this field read only.
  7. Now when you upload an svg file, this field will immediately be filled with the svg code for that file.

About

get svg code from uploaded svg file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published