kongondo Posted March 25, 2016 Author Share Posted March 25, 2016 No worries. I have also edited my post RE the second part of your question Link to comment Share on other sites More sharing options...
bernhard Posted March 25, 2016 Share Posted March 25, 2016 As for your question about image replacement: I think it would be easiest to either extend FieldtypeFile or modify FieldtypeImage as a new module (and/or their related Inputfields - am not sure). What exactly are you after? I ask because I know there are some cool changes coming to the 'standard image field' and those might just meet your needs. actually i'm only very eager about client side image resizing. i know that this is on the roadmap for 2016 but that can be everything between next blog post tomorrow and december maybe you have some more details? i'm getting offtopic here so i started a new thread in pub: https://processwire.com/talk/topic/12861-feature-wishlist-for-shortly-planned-developments/?p=116757 Link to comment Share on other sites More sharing options...
kongondo Posted December 1, 2016 Author Share Posted December 1, 2016 Update: Jquery File Upload Version 0.0.3. Changelog Fixed an issue that caused duplicates in image gallery Some minor enhancements Glad to also announce that I've tested and can confirm that Jquery File Upload is compatible with ProcessWire 2.8.x and ProcessWire 3.x 3 Link to comment Share on other sites More sharing options...
kongondo Posted December 9, 2016 Author Share Posted December 9, 2016 Update: Jquery File Upload Version 0.0.4. Changelog Fixed a small bug introduced during the last commit. This causes some images not to be displayed in image gallery. 1 Link to comment Share on other sites More sharing options...
Chris Whissen Posted February 13, 2017 Share Posted February 13, 2017 @kongondo love the module, it's helped me get past a hurdle. One issue I'm encountering is uploading more diverse file types - zip and various Adobe types. Is this something that the module can support? If so, any ideas what I'm doing wrong? I've added allowedNonImageMimeTypes under the ajaxoptions('application/pdf', 'application/postscript', 'application/octet-stream', 'application/x-compressed', 'application/x-zip-compressed') and added the extensions to the acceptfiletypes under jfuoptions. The files show up, I get upload progress, and then I get the message: Empty file upload result Nothing shows up on the server. If I upload JPGs or PDFs - either on their own or at the same time as non-working files - they work just fine. I'm on PW 3.0.42. Link to comment Share on other sites More sharing options...
kongondo Posted February 13, 2017 Author Share Posted February 13, 2017 @Chris Whissen, Welcome to the forums. Glad you are finding the module useful. Does any of these conditions (see the @note) apply in your case? Link to comment Share on other sites More sharing options...
Chris Whissen Posted February 13, 2017 Share Posted February 13, 2017 @kongondo thanks - I'm new to alot of this and just starting to figure it out. These forums and the modules have taught me alot! I don't believe any of those apply - the server is running PHP 5.4+ on Linux. Link to comment Share on other sites More sharing options...
kongondo Posted February 13, 2017 Author Share Posted February 13, 2017 @Chris Whissen, Hmm. It means, then, that the reason they are not passing validation is because they are failing the PHP mime type tests. This is either because their mime types are unknown or the 'files are not what they seem' (aka faked files)': Can you confirm you are passing the allowedNonImageMimeTypes to processJFUAjax() If they don't contain any sensitive data, is it possible to PM a couple of those files getting rejected to help me debug this further? Link to comment Share on other sites More sharing options...
Chris Whissen Posted February 13, 2017 Share Posted February 13, 2017 6 minutes ago, kongondo said: Can you confirm you are passing the allowedNonImageMimeTypes to processJFUAjax() Yes. I'm doing it like this: 'allowedNonImageMimeTypes' => array('application/pdf', 'application/postscript', 'application/octet-stream', 'application/x-compressed', 'application/x-zip-compressed'), Quote If they don't contain any sensitive data, is it possible to PM a couple of those files getting rejected to help me debug this further? Like thi No problem. I'll have something to you in a moment. I personally created the Zip in Windows and the AI in Illustrator, so they shouldn't be fake. Link to comment Share on other sites More sharing options...
Chris Whissen Posted February 13, 2017 Share Posted February 13, 2017 @kongondo I'm an idiot and thank you for your time and help. I reread the module a little closer and realized I need the acceptfiletypes twice - once for Ajax options and once for JFUoptions. I only had it once. Added that in and everything is working fine. Apologies for wasting your time, truly appreciate the help. Link to comment Share on other sites More sharing options...
kongondo Posted February 13, 2017 Author Share Posted February 13, 2017 No worries. Had just come to that conclusion just before your response. Actually, I am the idiot! I notice that 'acceptFileTypes' is not documented! Users shouldn't have to read the module code to know how to use it ! When I get the time.....(ahem..). Yes, so what was happening is that good ol' WireUpload was rejecting those file extensions at this point. Glad you got it sorted and now thanks for the reminder that I'll need to update the docs . 1 Link to comment Share on other sites More sharing options...
Chris Whissen Posted March 20, 2017 Share Posted March 20, 2017 (edited) So, I'm stretching my knowledge here and can't quite figure out an issue. If I'm logged in to PW and go to front-end upload page, everything works fine. If a guest attempts to upload a file, they get an "Internal Server Error." I'm guessing it has something to do with the security, specifically(emphasis added): On 1/28/2016 at 9:39 PM, kongondo said: Server-side, no Ajax requests are honoured unless specifically set via configurable options server-side. I'm not sure what I need to be doing for that though. I've tried to figure out on my own, but am not having much luck. Can anyone point me towards how to make this work? (Assuming there's no other obvious reason for the error.) EDIT: Just to narrow possibilities, I created a user with guest permissions. If logged in, uploads without issue. It's only an anonymous user that can't upload. Which is an essential function for this site. Am I overlooking something obvious? Edited March 20, 2017 by Chris Whissen clarification Link to comment Share on other sites More sharing options...
Chris Whissen Posted March 20, 2017 Share Posted March 20, 2017 Okay, I managed to get it to work, but I'm not sure it's the best and safest way to do it. Ran Tracey Debugger and got "This request was aborted because it appears to be forged." error message. I did some research on that and disabled protectCSRF through config.php ($config->protectCSRF = false;). Now. anonymous uploads work fine. I'm not sure if that's the right way to do it, but I'm also not sure this is the right post to be asking - that might be more a ProcessWire issue than this module. Link to comment Share on other sites More sharing options...
kongondo Posted March 21, 2017 Author Share Posted March 21, 2017 16 hours ago, Chris Whissen said: If logged in, uploads without issue. It's only an anonymous user that can't upload Guests should be able to upload. I am not sure what's happening in your case. Just to be sure, I've double checked in PW 2.7, 2.8 and 3. Guests (meaning frontend users not logged in [anonymous if you like]) can upload just fine. 16 hours ago, Chris Whissen said: I'm not sure if that's the right way to do it, but I'm also not sure this is the right post to be asking - that might be more a ProcessWire issue than this module. There's no issue with the module nor with ProcessWire (I believe) in this case . There's something else going on in your install I suspect. Some setting or hook or similar? 1 Link to comment Share on other sites More sharing options...
Chris Whissen Posted March 21, 2017 Share Posted March 21, 2017 Thanks for looking into it @kongondo. I have quite a few modules running, so there could be something in there making a mess of things. Another mystery to solve - at least that one can wait a bit. Appreciate the help and love the module! Link to comment Share on other sites More sharing options...
Chris Whissen Posted March 28, 2017 Share Posted March 28, 2017 @kongondo I just noticed something in the module. It says the file size limit is set at 2GB, but it appears to be set at 200MB. Link to comment Share on other sites More sharing options...
kongondo Posted March 28, 2017 Author Share Posted March 28, 2017 35 minutes ago, Chris Whissen said: It says the file size limit is set at 2GB, but it appears to be set at 200MB. Check your PHP ini for these settings: post_max_size upload_max_filesize Link to comment Share on other sites More sharing options...
Chris Whissen Posted March 28, 2017 Share Posted March 28, 2017 I fixed the problem for me. Letting you know because I think you have either a missing zero or typo in the module. It reads: 'maxFileSize' => 200000000,// 2GB Assuming that's bytes, that equals 200MB, not 2GB - also assuming I can still do math. I added a zero and pasted it into my jfuoptions array and everything works for me. 2 Link to comment Share on other sites More sharing options...
kongondo Posted March 29, 2017 Author Share Posted March 29, 2017 12 hours ago, Chris Whissen said: I think you have either a missing zero or typo in the module Nice catch Chris. You are right. I was missing one Zero. Corrected in version 5. Update: Jquery File Upload Version 0.0.5. Changelog Fixed a typo in the default setting of maxFileSize. Thanks @Chris Whissen 1 Link to comment Share on other sites More sharing options...
kongondo Posted October 16, 2017 Author Share Posted October 16, 2017 Update: Jquery File Upload Version 0.0.6. Changelog Added support for SVGs (to be recognised as images, etc). 1 Link to comment Share on other sites More sharing options...
kongondo Posted November 21, 2017 Author Share Posted November 21, 2017 Hi all. I am intending to ONLY support ProcessWire 3.x starting from the next version of this module. Please have a read here and let me know what you think. Thanks. Link to comment Share on other sites More sharing options...
horst Posted January 8, 2018 Share Posted January 8, 2018 Hi @kongondo Is it possible to use this in pws backend page edit? Maybe in junction with a hidden files field? Link to comment Share on other sites More sharing options...
kongondo Posted January 8, 2018 Author Share Posted January 8, 2018 37 minutes ago, horst said: Hi @kongondo Is it possible to use this in pws backend page edit? Maybe in junction with a hidden files field? I've never tried it...but I don't see why not it shouldn't work in something like RuntimeMarkup field. 1 Link to comment Share on other sites More sharing options...
huhabab Posted January 28, 2018 Share Posted January 28, 2018 Hello @kongondo I really like the module! I just have a problem with adding eventlisteners, nothing I tried so far seemed to work, are the $('#fileupload').bind functions from the jquery file upload-documentation the right ones? Currently I hacked my code into the downloadTemplate-function of the jqueryfileupload.js, accessing the other events would be killer though Link to comment Share on other sites More sharing options...
kongondo Posted January 28, 2018 Author Share Posted January 28, 2018 Hi @huhabab, Welcome to the forums. Glad you find the module useful. 1 hour ago, huhabab said: I just have a problem with adding eventlisteners, nothing I tried so far seemed to work, are the $('#fileupload').bind functions from the jquery file upload-documentation the right ones? Yes, they are. What events are you missing? Have you seen the ones listed in the docs under Callback Options ? I have tested a couple and they work as advertised. The Callbacks section of the API Docs is also a good read in this regard. Maybe you can show us some code? 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