uchihaabhi's avatar

Using dropzone with laravel 5.4 set image name

I am using Dropzone for image uploading. Suppose I am uploading more than 10 images at a time and I need to maintain this image name format

$fileName = 'IMG' . $customerID . '' . date("YmdHis") . '' . mt_rand(1,9);

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

0 likes
1 reply
bobbybouwmann's avatar

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.

Please or to participate in this conversation.