This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

shina
shina

I'm looking for a way to add some additional information to an image, but it seems to be not extendable.

I'm not sure how to solve this issue. So I'm opening this topic for a discussion.

Last updated

Daniel81
Daniel81

I have just extended the system_files table in the DB with extra columns that I needed, I know its not the best solution, but it's working for me, didn't have a lot of time to investigate extending an image object, but would interested to know if anyone has managed this. I will have a look myself anyway when I get chance

jakobf
jakobf

Doen't seem like a good Idea, why don't you create a regular model with a file attachment and add some fields of your liking. In the backend fields.yaml config of the model, you name it an image and define all the other fields and there you go.

Maybe read the documentation again.

kattsoff
kattsoff

I extended FileUpload widget in my plugin for this.

Hybrid
Hybrid

@kattsoff - I'm trying to do something similar by adding a URL property to the FileUpload widget but it seems quite complicated and it looks like I need to override the form widget, which involves all sorts of other steps. I want to keep all the functionality of the standard file upload like multiple items, sorting etc so I'm curious to know how you did it, if you don't mind sharing?

I think the only thing I need to change in the formwidget is the _config_form.htm partial. Do I need to copy everything just to change that? I'm still figuring out October so please excuse me if I'm missing something!

1-5 of 5

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.