1.0.7 • Published 5 years ago

@elsekoya/feathers-hooks v1.0.7

Weekly downloads
-
License
ISC
Repository
github
Last release
5 years ago

feathers-hook

@elsekoya/feathers-hook

this package is feathersjs hook for create and update service methode to convert field name that contain 'image' and contain base64 string to file in drive and save url of file to field

how to use

1-define image dir and image_url var in config/default.json

"images_dir":"../public/images"

"image_url":"/images"

2- import in app.hooks.js

const {base64Hook} = require("@elsekoya/feathers-hooks/base64-to-image")

3-

{

all: [ log() ],

find: [],

get: [],

create: [base64Hook],

update: [base64Hook],

patch: [base64Hook],

remove: []

}

5 - add

app.use(express.json({limit:'10mb'}));

app.use(express.urlencoded({ extended: true,limit:'10mb' }));

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago