Hi
I have a website and form created, the form has some basic contact information, textbox and two upload boxes (1 for photos and 1 for a word/spreadsheet upload). As it stands someone will take pictures (from 1 to say 25), then they need to either download a program to resize or resize online and then zip into a single folder before uploading. Unfortunately the website is based on making things easier whereas this is not the case at the moment! Not everyone knows how or why they need to resize and zip so I have to explain the whole process on the website! Also I cannot simply put 25 "upload boxes" as this would look bad, even if they were hidden, the user may still have to individually upload 25 images!
I need to make this task as simple as possible. This is what I envisage:
1. When the "upload photos" button is clicked a standard window opens allowing multiple images to be selected at once. (as opposed to the individual file that the upload function currently provides).
2. The selected images would then preferably be listed on the form.
3. On clicking "submit" the script would: a) resize all the images to say 1024x768 or 768x1024 depending on whether the image is landscape or portrait. (there may be a better way of doing this).
4. I currently have a message stating "Please wait the upload may take a while etc" that appears at the bottom of the form (doesnt look very good) but would prefer a status bar during upload or pop-up that appears and then dissapears when the upload is successful.
5. Any checks or validation would also be needed eg wrong file type etc etc
So in a nutshell 1 button to upload multiple images, they are checked for correct file type etc, reduced in size on clicking "submit" and there is a notification that the process is happening.
I am willing to pay for this service as I have no knowledge of javascript, java, php. From reading the forums I am certain there is someone who easily has the knowledge to complete this and I really think it would be a useful addition to chronoforms anyway.
Please reply if you are able to help
Many Thanks
Hi noodle,
I've no idea how to do this but one small helper might be the image-resize plugin which will handle a re-size one image upload per form.
Bob
Hi noodle,
Would a flash-based uploader be an acceptable solution for the uploads-part? (think along the lines of the file attachment in GMail etc - often called 'bguploads'). Compability with non-flash or non-javascript enabled wouldmost likely be lost this way though.
That said, this kind of form is borderline to CF's capabilities , but possible with some thoughtful coding/scripting. I had a simple proof-of-concept, which unfortunately got broken with the Flash 10 update (used Joomla's flash uploader).
I might be able to come up with a new solution in a few days, although I cannot promise a solution just yet.
Regarding resizing, the plugin Bob mentioned should do the trick fine for a normal upload. In the case of the 'bgupload' mentioned above, we're bypassing alot of CF's mehanics pretty much ruling out the plugin. However, this should be fairly easily sorted as long as the GD library is available on the web server (usually is).
/Fredrik
Hi Frederik
Cheers for replying! Assuming when you say GMail that means google mail then yes that is exactly what I am after! (the way multiple uploads are selected in 1 go and status bar showing progress).
I dont think there is any parts of the website that requires flash at the moment (there is a javascript "simple image rotator", would a notification be needed to tell the user to install flash when they first go on the website or does firefox etc "know" flash is needed and informs the user automatically?
I dont quite know what you mean about "compatibility with non-flash or non-javascript enabled wouldmost likely be lost though". Are you saying here that people will now need to download flash/ enable javascript etc to use the website whereas before they may not have needed to?
I checked on the web hosting site and under "programming features" there is GD listed which I assume is the GD Library that you mention so that seems ok. The joomla website is on a local host at the moment though.
As you know photo file sizes are huge and can be about 3Mb in size, the other part is to resize these before uploading as there may be say 25 images and the plugin bob mentions only does one image but I assume the method could be replicated somehow. I think if they are resized to say 1024x768 then they would be approx 100k in size in which case many files could be attached. How the resize process is done I have no idea, maybe the code can "test" which side of the image is longest (therefore knowing if it is in landscape or portrait). Then change the longest side to 1024 and shortest to 768 maybe. Maybe cameras record the orientation of the image (i know when you import an image there is option to auto rotate so maybe there is)
I know when you attach images in say hotmail they are resized before transmission and there is the option when you select multiple images in vista, right click and select "send to recipient" a box comes up asking what size you want them resized to. This is exactly the action I need it to do.
This will make my website 10 times better if this functionality is included because as it stands asking people to download an image resizer, resize and then zip the files before completing the form and all the explanation that goes with it is really off putting for them!!!
I cant tell you how much I appreciate you offering to help in this way!!!!
Hi nodle,
An update..
I've been working with/picking a fight with the swfupload (flash-based file upload utility that supports Flash10). This is a very flexible utility, unfortunately also rather complex one. Once all support-javascripts are in order, it should be able to let the user select multiple files, resize them within the browser (prior upload), very customizable upload progress bars, 'ajax-style' (staying on the same page while uploading) - pretty much all you asked for (and more).
This however, requires that your visitors have a flash player installed in their browser (most do, though some don't). The mechanism for 'embedding' flash movies also lets browsers without flash know where to get it (both IE and FF will offer a small bar to auto-install flash). This should cover some 98% of the browsers out there these days.
Due to the way browsers work, the non-flash approach would not allow client-side resizing or multiple-select files. Further, PHP (which Joomla runs under) provides little means to get the upload progress - in most cases, using an external cgi-application to handle the upload would be easier. This in turn is limited to what kind of programs the web server supports as cgi's If at all - admins are paranoid). With swfupload, the flash application would be able to kep track of how much of the file it has sent removing the ned to ask the remote server.
As such, I would strongly recommend using swfupload unless it is vital to support non-flash browsers.
I'll see if I can't get it working on my dev-site, and get back to you in a few days..
/Fredrik
Hi Fredrik
All I can say is thankyou so much for your work! I went to the SWFUpload.org website and now understand what you are saying. Just a quick one; You say "resize them within the browser (prior upload)". Is this an automatic thing or is there a user input involved here?
Again I really thank you for your willingness to sort this problem!!!
Kind Regards
Hi noodle,
I had some success with the swfuploader this evening, and the Image Resize feature is pretty much transparent to the user (they don't have to take any actions in addition to selecting the file(s) to upload).
Since these uploads are not directly linked to the form, and I suppose you'd like to take some further actions with the (already uploaded) files once the form is submitted, this will need some further coding. Also, I would recommend adding some "Garbage Collector", in order to clean out old files that never had an associated form submission.
/Fredrik
Hi There Frederik
Thought I would just mail and see how you are getting on with the SWF uploader and stuff.
Kind Regards
Hi Noodle,
Current status: I have a demo-form with full resize and upload capabilities. Uploaded files are stored on the server and file information is associated with the user's current session (such that it could be used for further processing when the actual form is submitted).
I'm not sure what further actions are expected. Also, details regarding requirements of some Garbage Collector (as mentioned in my previous post) is needed.
Further, would this form need some backup-solution for visitors not keen on installing/enabling Flash player/Javascript? Be advised, that such backup-solution would probably require the old behaviour of user uploading a zipped archive (especially if we're not using javascripts).
So... I pretty much need to know what to do/where to go next with this.
/Fredrik
Hi Frederik
Sounds superb what you have done, I really appreciate it!
The user fills out the form, attaches the multiple images (which are uploaded to server) and clicks "submit". The way I had it working before was on clicking "submit" the form information and attachments were sent by email to the address I specify. The email I receive was constructed using the "email template" in chronoforms so i could see name, address, email address etc and the zipped images as an attachment.
I dont quite know how uploaded files are normally dealt with on the server side but is it that they should stay there with the email until I select to delete that email?
Regarding the backup solution - What do you think is best? Warning that you need to install Flash to upload the images or it cant be done, or a message saying if you dont want to then zip up files and attach? What sort of percentage of people wouldnt install the required software do you think? Maybe put a tooltip on the upload box on the form saying if you dont want to install flash then attach as a zip? How would say a big website deal with this issue?
If it was say your website what would you think was best way of approaching it?
Thankyou again!!
Hi noodle,
Email attachments would not be a problem. Should all sent files be removed from the website once submitted, or left on the server as some sort of backup?
Normally, uploaded files remain on the server until you explicitly remove them from the server (files attached to emails are only copies, and deleting the email or the attachments will not affect the ones on the server).
Backup solution: This unfortunately have not a uniform answer. Some sites simply state that users need Flash 9 or Flash 10 player installed to be able to view the site, other simply assume it is, others make javascript-only backup solutions (not something I would recommend with Joomla/CF), or simply provides a classic file upload option.
It all comes down to your intended visitors - if a majority of visitors could not be expected to use these advanced features, you'd risk alienating them. On the other hand, if they are accustomed to Google mail's neat'n'fancy upload with bars'n'bells'n'whistles - chances are they find an old-style upload button where they have to do all the work tiresome, and take their business elsewhere. Creating a please-all solution is a lot of work, as you'd have to detect each visitor's browser capabilities and more, and your visitors would find that the form works differently depending on what browser, computer, or simply settings they're using.
A Flash-only solution is very easy to create for starters, and extending this to support some simple backup (such as your current file upload) should be a limited task if the need arises.
/Fredrik
Hi Frederik
Yeah i agree about the flash question, get the flash upload part going first as this would apply to the greater percentage of people and then maybe "fine tune" at a later date if need be. It is expected that elderly people may use the service so yeah an alternative would probably be useful but hey getting the multi upload/ resize would be a huge leap forward and the small bits can be worried about later!
Regarding the attachments - I think I understand more clearly now. If I understand you correctly the email attachments I receive is just a copy of the ones that have been uploaded to the server then I dont think a "backup" of the images would be needed. As long as the attachment is there then I think it is ok. I have limited knowledge of this but if using IMAP (i think thats what its called) as opposed to POP would this make a difference? I mean with POP you download the mail and attachment to your local PC (so i assume it is then ok to delete the associated attachments stored on server)and IMAP it stays on the server. Would deleting this "backup" of images mean it would not work with IMAP. I hope you know what I am trying to say here!!!
Once again
Cheers!
Hi Noodle,
IMAP vs. POP3 would not make a difference in this case, since by "server" I am talking about the website, not your email account.
In the Email setup of your form, there is an option whether to attach uploaded files with the email, or simply include the name of the uploaded file(s). In your case, you've already made it clear this is set to send the files as an attachment, so we really don't have to worry 'bout this.
I'll see about having the email attachments sorted by tomorrow, please feel free to remind me as I've got quite a few things on my mind..
/Fredrik
Well..
I've got email attachments working well enough, though I believe I messed up the handler javascripts somewhere, as progress is only reported as the individual file uploads are completed, rather than during the whole process..
I'll have to look further into this.
/Fredrik
Hi Frederik
Cheers for the update, you are doing a great job
Regards
Hi Frederik
I have been trying to reply to your PM today but the message stays in "outbox" not "sent messages"!! Any idea what I am doing wrong, I dont understand why they are not sending!!!
Cheers
Hi noodle,
It will stay in 'outbox' until Fredrik reads it.
Bob
Hi,
Just joined today with several queries/objectives in mind, one of which was image uploads! Looks like I got lucky first time round, so thanks. I'll study the posts in more detail but please excuse me if I get back with a dumb question as I'm pretty inexperienced (and dumb).🙂
George
Did you guys get this to work? I am looking for a very similar solution. I would like to have an uploader that can resize up to 2000 images to a small size, max width or height of 200px i am thinking, and upload to the server. I am thinking Chronoforms because I have other form requirements and would like to link it to a table but I suppose I could handle the form first and the uploads after. Any help on this would be great maybe the demo that nml375 made would be close enough for me to adjust. I am looking at SWFUpload and I believe it could be a great solution if I could integrate it with Chronoforms. Please advise. Thanks!
up
I am also interested in this.
If someone come up with a solution, I would be glad to look at it.
Regards