Hie, I know setting up a default file upload is a security issues but is there a way where I can send a value if user does not select a file?
For instance i have an array of file as below:
<input type="file" name="image[]">
As you can see i have an array of image files. So, therefore if user is sending an array of data along with images I need to know the position of each images in accordance with the array of data. For example:
array1[0] Image[0]
array2[1] Image[1]
I need to send the data as above such that if there are 5 arrays of data I need to know for each array of data a particular image is assigned. Now if user fails to upload an image at position 0 i need to know at what position the user was unable to upload image. At the moment if user could not upload the image at position 0 the data passes would be
array1[0] Image[0]
array2[1]
But I would like the following thing to happen if user fails to upload an image at position 0 (for example)
array1[0] "no-image"
array2[1] Image[1]
or
array1[0] Image[0] = "no image"
array2[1] Image[1]
Just want to let the array after form submittion to know at which position the image was failed to upload by the user such that i could assign a default image name at the backend.
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2FCFyOw
via IFTTT
Aucun commentaire:
Enregistrer un commentaire