I have a template type view to allow users to create an event (like a social event...has name, description, image ect). I am using it for both the creation of an event and the editing of it.
I would like, when edit is selected elsewhere on the site, for the different fields to be populated with event details. I have this working for textboxes, textfeilds and selection type tags, but I am stuck on how you would do this with a file type.
This is what I have so far. This pattern worked for other inputs.
<input id="picture" class="form-control" type="file" name="picture" accept="image/*" value="{{($event == null ? "" : base64_encode($event->picture))}}" required autofocus/>
Just to be clear. I am not trying to fetch files off of peoples computers. The file is in my database (blob). All I want to do is put it back in the input field.
Is this even possible? If not is there another solution that I should consider.
Thank you.
you do realize that it is a blob data right? the only way you can show the data is by putting it inside a <img>
tag and decode the data from database. to edit the image, you need to create an input for new upload.
like this PHP display image BLOB from MySQL