php - Dropzone js parallel upload causes problems in backend -
i'm building system, users can upload images ads. each ad can have 8 images associated. 1 of images become primary image, display in search results , on. when upload multiple images using parallel , count existing records in db, make sure limit aren't reached, things weird. because images hit server @ same time, passes check make sure, upload 8 images , uploaded suddenly. works fine, if user upload 1 image @ time.
i don't know how come along bug. best practice ?
i'm using laravel 5, in case...
thanks!
public function store(uploadadimagerequest $request, $id) { $ad = $this->adrepo->getwithimages($id); $this->imagerepo->hasspace($ad); $image = $this->imagerepo->upload($request->file('image')->getrealpath(), $ad); }
Comments
Post a Comment