TOPIC: GSOC 2010: File Upload Question Type

The Advanced File Uploader has been implemented and is fully functional, well almost fully functional

So, Now one can do the following using the advanced file uploader:

* Upload one or more files by just the click of a single button
* Define Title and add comments to the file
* Once uploaded, the system lets you know that the file has been uploaded by giving a nice notice.
* Once the files have been uploaded, the surveyee has 2 options -

1. go to the "Gallery" Tab
2. upload more files on the "From Computer" Tab

* In the Gallery Tab, one can

1. Preview image files. Support for other file types may be added later
2. Edit the metaadata (title/comment) of the uploaded files
3. delete uploaded files

* Once, the surveyee is satisfied that he doesn't want to make any further modifications to the uploaded files, he can close the dialog, and return to the survey page.

The following still needs to be done with regard to the Advanced File Uploader.

* Post-uploading, when the surveyee returns to the survey page from the Advanced File uploader, he should see the list of uploaded files and small delete icons next to them for ease of use.

The uploader works, but looks a little ugly, as we are yet to work on the template. Also, there are a couple of form fields for debugging purposes and are going to stay there for a while during the development period. These will be set to hidden once the uploader becomes stable.

Select 'File Upload Type' in the question type while creating a question. You will have to create the directory "limesurvey_dev/upload/tmp" and give write permissions. If you come across any bugs, please report them at bugs.limesurvey.org and assign them to 'texens'.

Live testing The underlined parts are what I was not expecting or suggestions.

1. I have updated my work copy of the /dev repository.
2. I created a new question of type "Upload file". I selected the following advanced parameters: one file of type "*.png" have to be submitted.
3. Tried to test the question alone... However, it ends up with a 404 not found error on the following URL: "/limesurvey_dev/admin/uploader.php". Could you check it why?
4. Testing the whole survey seems to work. I'm under Google Chrome 5.0.
5. I'm uploading a file (the active icon, active.png) with a title and a comment, I click on "Upload" (Not touching to the other texts fields), there is a progress bar...
6. Then it says it worked! However, although I did upload the requested file, it didn't automatically switch to the gallery view so I had to click.
7. YAY I CAN SEE IT
8. Trying to update title & comment... I click on Save change, but there is no confirmation if it was really saved.
9. I click on delete... it disappeared, nice!
10. Going back to the "From computer" tab.
11. Browsing file in order to upload "junk.txt"... I think it would be nice if it rejected the file as soon as I chosen a wrong one (Remember that I have chosen *.png filter).
12. I haven't filled the title and comment fields.
13. Uploading... It says it worked... filter not working yet?
14. Checking in the Gallery... There is a broken image frame as it tries to display the junk.txt as an image.
15. In this case, there is no any information about what the file is. I think it would be nice to put somewhere the filename...
16. Closing the window and submitting the page.
17. The *.png filter didn't work so I guess the validation is not yet fully working.
18. I checked the /upload/tmp folder... There is a really strange thing there: The two uploaded file are still there but they're empty (0 bytes)...

This is taking a good form, almost fully functional as you said...
Hopefully my feedback will help you! I think this post may be used as a test case...

Live testing The underlined parts are what I was not expecting or suggestions.

1. I have updated my work copy of the /dev repository.
2. I created a new question of type "Upload file". I selected the following advanced parameters: one file of type "*.png" have to be submitted.
3. Tried to test the question alone... However, it ends up with a 404 not found error on the following URL: "/limesurvey_dev/admin/uploader.php". Could you check it why?

You're getting a 404 error on the aforementioned URL because the uploader sits in the limesurvey_dev directory and not the limesurvey_dev/admin/ directory. It won't work on its own, as it is dependent on the survey question for all its input. Its like a template for the upload question and not a complete entitiy on its own.

4. Testing the whole survey seems to work. I'm under Google Chrome 5.0.
5. I'm uploading a file (the active icon, active.png) with a title and a comment, I click on "Upload" (Not touching to the other texts fields), there is a progress bar...
6. Then it says it worked! However, although I did upload the requested file, it didn't automatically switch to the gallery view so I had to click.

The automatically switch to gallery has not been implemented yet. But you can expect it in the coming iteration

7. YAY I CAN SEE IT
8. Trying to update title & comment... I click on Save change, but there is no confirmation if it was really saved.

Thanks for pointing it out. We will have a flash notice for all the actions in the next iteration.

9. I click on delete... it disappeared, nice!
10. Going back to the "From computer" tab.
11. Browsing file in order to upload "junk.txt"... I think it would be nice if it rejected the file as soon as I chosen a wrong one (Remember that I have chosen *.png filter).
12. I haven't filled the title and comment fields.
13. Uploading... It says it worked... filter not working yet?

Yes, the filter has not been implemented yet, I don't want to use just the file's extension for testing a file's type. There are a couple handy PHP scripts that I'm looking into for this function. But, this is something that might be delayed for a while. Also, the number of minimum/maximum files in not yet enforced.

14. Checking in the Gallery... There is a broken image frame as it tries to display the junk.txt as an image.
15. In this case, there is no any information about what the file is. I think it would be nice to put somewhere the filename...

We'll get placeholders for the various filetypes and depending on the filetype, we'll display these placeholder images in their preview. Also, it would be a good idea to display the filename, thanks for the idea

16. Closing the window and submitting the page.

We'll also get a "Save and Exit" button, and on pressing this button the modal dialog will close. So, the users won't have to explicitly click on the "cross" on the dialog's top right.

17. The *.png filter didn't work so I guess the validation is not yet fully working.
18. I checked the /upload/tmp folder... There is a really strange thing there: The two uploaded file are still there but they're empty (0 bytes)...

This doesn't sound good. Could you please give me some more information on this bug? Which OS are you using?

This is taking a good form, almost fully functional as you said...
Hopefully my feedback will help you! I think this post may be used as a test case...

Definitely CarbonaCat, the feedback is very useful and helps me identify possible issues and fix them. Thanks a lot for your time

Oh, right, here is my config:
-Windows XP SP2,
-PHP5.3, running on WampServer 2.0
-FYI: My HDD partition is FAT32 (Well, I don't have any control over it, it's a corporate policy). Just in case it may have an impact.

It's likely as the files were overwritten with empty content instead of simply deleted.

For testing the question alone, I think you'll have to do something sooner or later. Well, it's not critical, but it'll help the surveyor to configure its upload question.
In fact, I think the testing itself should lead you to a dummy uploader that allow you to test your filters and parameters (number of files, ...).

It may become complicated to use your filter if you want to test more than the extension. May you should think of file type groups, like images, texts, xml,... instead of simply a filter type...

I haven't tested it on a windows machine, so it might be a windows specific thingy. I'll take a look into this issue.

For testing the question alone, I think you'll have to do something sooner or later. Well, it's not critical, but it'll help the surveyor to configure its upload question.
In fact, I think the testing itself should lead you to a dummy uploader that allow you to test your filters and parameters (number of files, ...).

I misunderstood the problem in the previous post. Definitely, the test uploader should work and is a valid issue. Glad that you caught it. You see, this is why I love feedbacks

It may become complicated to use your filter if you want to test more than the extension. May you should think of file type groups, like images, texts, xml,... instead of simply a filter type...

This file type filter thingy sounds like a good idea, so I'll implement this one.

r8831: GSoC-FUQT Added support for uploading files and inserting associated metadata using the data entry screen.

r8833: GSoC-FUQTAdded support for downloading uploaded files in zipped format from the browse screen

On the basis of the feedback on the support forum, mailing list and discussion with my mentor Carsten, we have decided to make some modifications in the Advance uploader to enhance its usability and make the uploading experience much easier for the surveyee. The uploader now, will have 3 phases viz:

PRE-UPLOAD: use ajax so that the file upload automatically *starts* once the file has been selected

DURING-UPLOAD: as the file is *being* uploaded, the "Loading" animation plays

POST-UPLOAD: once the file *has been* uploaded, the upload button for that file is replaced by the preview and title/comments field

Since the preview of the uploaded file will come up on the same tab as soon as the file has been uploaded, we can remove the gallery tab. So we can do away with the confusions associated with switching in between the *gallery* and *upload from computer* tabs.

This week, apart from implementing the modifications in the file uploader, I'll also be adding support in the statistics module for fuqt and editing some of the templates shipped with LS1 to align File uploader's styling with that of template's.

I'm working on the statistics page for the File Upload Question Type.
We have decided to add the following filter to the FUQT.

Number of files uploaded in response to the question. Range [0, maxfiles] where maxfiles = maximum number of files that can be uploaded for that question.

File Type: i.e. file extension. for eg, pdf, doc, txt etc

I would like to invite suggestions from the community as to what other filters we could possibly use for the file upload questions. Please pour in your ideas regarding filters so that we can incorporate them in our implementation.
In order to take a better look at statistics, please navigate to browse screen on the panel and use the statistics option.
Also, you can read more about the features provided by statistics on this page

Thanks for reporting this warning message. This will be fixed in next commit.

In the last couple of days a lot of peripherals have been added to the file upload question type - such as checking valid extension types, depending on the administrator's settings, maximum number of files that can be uploaded, handy notifications on the activities etc.

I'd really appreciate if you could test these functionalities and drop some feedback on the user-interface, notification messages and overall ease of understanding etc.

will do, we are planning create a survey for some work the university i work at is doing. So once the survey is set up i could give you some info on how our pilot test goes this could give you some incite as to how the general user finds the file upload.