Jake2315's avatar

How do I acces the old file upload value?

When editing my form, how do I get the old file upload value?

My code:

<div class="form-group">
    <img src="{{isset($step) && $step->icon ? icon_url($step->icon) : 'http://placehold.it/300?text=Stap icoon'}}" height="260" width="300"}}>
</div>                    
                    
<div class="form-group">
    <input type="file" name="icon">
</div>
0 likes
5 replies
tomopongrac's avatar

That is not possible because browser are design in that way for security risks ...

nikocraft's avatar

I have a form where user can select images to upload. I upload images using ajax before the form is even submited. When form is submited user has option to come back "edit" the form. I then load the images from session and show them as already added images with option to remove each separatly.

New images can also be uploaded while on the edit form. This is one way of doing this if you need to edit the form and also give user ability to remove already uploaded files or add new files.

Please or to participate in this conversation.