Insert Image manually to DB

Silverstripe Version: 4.7

**Question: Insert Image manually to DB **

Hello. I have a question about adding image manually to SS, i have migrated SS from 3.0.3 to 4.7 in previous version i can manually add record to DB (special insert to File table than modify ID in object related to this Image) In new version its not working becouse the image is not published. There is any way to insert Image and than publish it manually or i need to make API to silverstripe and save image by SS couse i know that new version generate special hash and someting more like thumbnails for img.

If i need to make API i cant find in docs how can i insert Image to object from PHP someone have any examples? i mean i want to save IMG not from CMS admin page but from backend side.

i have script which move my file to assets so i need to make it visible by SS in object.

Thank you in advance :slight_smile:

1 Like