Has anyone done a "media" section?

William Flanagan
Hey all,

Using Jumpstart, I've got the need to use/reuse pictures/images/videos over and over again. I was considering adding a "media" section, similar to Wordpress.  In this controller, I would list, store, upload, and delete media.  Then, the media should give me a "shortcode" I can use to insert that media into text.  

Has anyone done this previously that can save me from inventing the wheel?

WF

Bryan Stewart
Hi Will,
I havent done this before, but why not make a media model with the file path and a shortcode. Then where you want it have it pull the image in based on the shortcode? If you want a preconfigured shortcode, you could but in some random text generator or even based on the filename
Chris Oliver
I like 's suggestion. You could use a hashid or something for the shortcode maybe. 

I think a simple Media model associated with Team/Account and a single file attachment would work nicely.

Also if you were to make the Media model Attachable, you could integrate it with ActionText like we have @ mentions for the User model.
Notifications
You’re not receiving notifications from this thread.
© 2022 Jumpstart Pro by GoRails, LLC