Implement FreeBSD community portal (FCP6) - file upload from WWW FreeBSD
Status: Closed Time to complete: 240 hrs Mentors: Wojciech A. Koszek, Jakub Klama Tags: WWW, Python, community, portal, FreeBSD, PHP, Ruby

Description of a task

This is a research task. It may or may not be deployed in production systems. No effort has been made to coordinate this task with the FreeBSD Core Team.

In order to accomplish this task you must implement a PHP script with a form asking a user for a file to upload. Once the user clicks 'Upload', file is send to the server and (1) filename of the file is stored in the SQL database (2) SHA1 checksum of the contents of the file is calculated (3) the file is stored to the file name which is equal to the SHA1 value. SQL table can be very simple - FILE_ID, FILENAME, SHA1_CHECKSUM

Example:

You have 'freebsd.txt' text file which has 'FreeBSD' in it. Once the user uploads the 'freebsd.txt' file, SHA1 is calculated and the result is '5ca5c2e9f3fd4fae8db2f481cc2ae65c649c4365'; file is saved to '5ca5c2e9f3fd4fae8db2f481cc2ae65c649c4365.db' file, and values(1, 'freebsd.txt', 5ca5c2e9f3fd4fae8db2f481cc2ae65c649c4365.db) land in the SQL table.

Uploaded files should be kept in 'db' directory. So the full path to the file saved should be 'db/5ca5c2e9f3fd4fae8db2f481cc2ae65c649c4365.db'.

Please follow Steve's Krug "Don't make me think" principles as well as Jacob Nielsen's useability rules when designing the WWW form. In other words: make it as minimalistic and simple as possible.

Technology choice is up to you, but PHP is preferred (Facebook API is in PHP at least). No framework is required to accomplish the task; however, frameworks aren't prohibited. In case of not using any framework, please follow the MVC design principles.

Uploaded Work
File name/URL File size Date submitted
upload_files_table.sql 168 bytes December 05 2011 16:36 UTC
upload12052011.php 1.9 KB December 05 2011 16:37 UTC
Comments
n00l3 on December 4 2011 15:56 UTC Task Claimed

I would like to work on this task.

Wojciech A. Koszek on December 5 2011 10:20 UTC Task Assigned

This task has been assigned to Violet Lin. You have 240 hours to complete this task, good luck!

n00l3 on December 5 2011 16:38 UTC Ready for review

The work on this task is ready to be reviewed.

Wojciech A. Koszek on December 5 2011 21:35 UTC Task Closed

Congratulations, this task has been completed successfully.