Welcome Guest, Not a member yet? Register   Sign In
Blob Data in Oracle
#2

there is another approach , whic h is the way i do it. All you need in a databse to reference an image is to store its name and being to produce the path to where it is.

So i just upload images to public images ; with blogs, when i create a new blog image goes to /public/blogImages.

obviously some check needs to be made to make sure there is no attempt to upload an image that already exists. Then I can display any image in any view by retrieving image name from database relevant to some sql and display it . if its a blog sql, i know images are in b.ogImages so i get entries using model from db, then i pass to controller > I can use a for each to display all blogs ,and have a a href that can be picked up by routes and get detail For a blog article where Blog is the data handle i show in view using :

Code:
echo "   <div class =\"blog\">  <img class = \"img-fluid \"                <img src =".base_url('blogImages')."/".esc($blog['image']).">  </div>";

SO any reason to go storing actual image in db?
CMS CI4     I use Arch Linux by the way 

Reply


Messages In This Thread
Blob Data in Oracle - by gurthang75 - 03-13-2023, 12:51 PM
RE: Blob Data in Oracle - by captain-sensible - 03-14-2023, 02:21 AM



Theme © iAndrew 2016 - Forum software by © MyBB