keystone-classic icon indicating copy to clipboard operation
keystone-classic copied to clipboard

Keystone js File storage capabilities...

Open Rajivkumar1234 opened this issue 5 years ago • 2 comments

How can we auto set an image using keystone 4? . For example if i have a model name Person and person has name , age , and profile pic . Now instead of manually uploading profile Pic . I have created a feature where data is being uploaded from csv , csv contains name , age and profile pic URL . Now I want to set that profile pic URL automatically is that possible in keystone 4? so that i no longer manually upload picture or set automati image from local file

What I did is an http request to the URL, download the file on your server and set it on your profile Model... but how can we set it through the model ?

Rajivkumar1234 avatar Aug 29 '19 05:08 Rajivkumar1234

Hi, in your case, why do you not simply store the profile picture as an URL instead of downloading it and re-storing it? Moreover, your not responsible anymore for the good availability of the file!

aleygues avatar Aug 29 '19 11:08 aleygues

Maybe because he needs a server copy of those files that in case that the source of the url no longer exist at least he would still have a copy.

jelordreygulle avatar Sep 02 '19 01:09 jelordreygulle