Suppose
We have some photos that need to be updated
The user wants to delete one of the files while editing,
How do you know user has sent a NULL input file or not changes?
becuse Input type “file” returns EMPTY ,
So we have two similar state,
for example:
if($request->hasFile('filename')) {
//here is!!! ok you update the file
}else{
//but here not ok,
if you check input exist ,it does not solve the problem
}
how you handle this!
Top comments (2)
Create a checkbox input to mark photo to de deleted:
And in the backend service:
good idea,thank's