wayne.davies Posted August 12, 2016 Share Posted August 12, 2016 Hi I have an image field in the back end, that expects multiple images. Now I've added this hook as the files are added: $page->addHookAfter('InputfieldFile::fileAdded', function($event) { $inputfield = $event->object; wire('log')->save('image-resizing', "Resizing "); $image = $event->argumentsByName("pagefile"); $image->size(800,0,array('upscaling' => false)); $image->size(300,200,array('cropping' => true, 'quality' => 80 )); }); It works absolutely fine for a small amount of images, but uploading a large amount doesn't seem to work. No errors are logged either. Now all thes photos appear to have uploaded in the back end, and show the thumbnails, but upon clicking save images are missing. I've checked all my php settings and ensured they are all adequate enough. memory_limit 512mbupload_max_filesize 200mbmax_execution_time 300 If I disable this hook, I can upload all images fine. Please could anyone other any insight into what may be causing this issue? Thanks in advance Link to comment Share on other sites More sharing options...
horst Posted August 12, 2016 Share Posted August 12, 2016 Witch PW version is this on? Do you use DB-SessionHandler? Can you view Apache logs? Any entries there? Link to comment Share on other sites More sharing options...
wayne.davies Posted August 12, 2016 Author Share Posted August 12, 2016 Sorry forgot to mention that! Its ProcessWire 2.7.2 and yes I use the DB-SessionHandler. I've checked all the logs, including Apache and nothing appears to show a problem. Link to comment Share on other sites More sharing options...
horst Posted August 12, 2016 Share Posted August 12, 2016 If you can, disable the session DB-handler. It is known for this behave in regard with multiple parallel images uploads. Or, if you cannot switch to session handling via files, the only other alternative is to switch PW Version up to PW 3.0.21+ (?) not sure the correct version where DB-Sessionhandler was updated / corrected. Other possiblities are not there in your case, I believe. 4 Link to comment Share on other sites More sharing options...
horst Posted August 12, 2016 Share Posted August 12, 2016 Sorry, I forgot about it. Another solution would be to stick with PW 2.7 and the (old) SessionHandler-DB, but uploading multiple images packed into a ZIP! (only one ZIP at a time) This I uses on a client side with (old) SessionDB-Handler since PW 2.5, (upgraded to 2.6, then to 2.7) for years now, and it works correct! 1 Link to comment Share on other sites More sharing options...
wayne.davies Posted August 12, 2016 Author Share Posted August 12, 2016 Thank so much, would have never have figured that out! I've disabled the DB Session handler for now, and is all working fine. 2 Link to comment Share on other sites More sharing options...
flydev Posted August 13, 2016 Share Posted August 13, 2016 for reference : 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now