There could be chanced when image name matches and could replace
what could be the solution?? can I use a $count and increment it?? but in dropzone each request is a fresh one
Well to replace images with the same name I would recommend you to just use the same original image name, or allow dropzone to only upload one image at the time.
Also replacing images by name is hard thing to do if you add the date and time to the name of the file. In general it would be more logical to simply delete a single image and upload a new image regarding the name.