Hi I have dropzone and intervention in my website but there are times that it does not display the image uploaded it just display a broken link of the image. I check the image directory and the image I upload is there and also it exist in the database, but when I access the image file in the url it returns 404 not found.
here is what I use to rename the image before upload
@Gerard yes the image link exists in my image directory, I check it also in my database and exists there with correct name and extension name.
That happens rarely which bothers me if that is a bug or it is caused by using "time()"
I was actually network throttling the uploading process to see that the cancel upload is working that comes with dropzone
In the middle of the progress I cancelled the progress of the second image then the first image successfully uploaded but It displays broken image link but
exists in my directory and in my database.
Another case is that when I upload multiple images simultaneously that problem happens sometimes but not occasionally
@JackD I mean the generated url in HTML, what source <img src=""> are displaying in the broken one? If you open that generated URL in a new browser tab you can see it or stills broken? Can you show me an example of generated HTML tag?
If the image exists in the corresponding folder of the path indicated in the URL it should work. Where is your image directory? Remember it must be in the public folder.
@jekinney No my test image file have no spaces in name.. It's kinda weird because it happen so rare and I think It is not in my dropzone but in the intervention. I encountered it twice today while testing the image upload function. Will try random string as temporary, do you think using time() is also reliable for renaming files to be uploaded?
@Gerard in the display page it is broken image link, when I open the image source link it displays 404 page, but it exists in the directory folder which is inside my public folder which means the image has been transferred to my directory successfully.