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.
| 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 |
I would like to work on this task.
This task has been assigned to Violet Lin. You have 240 hours to complete this task, good luck!
The work on this task is ready to be reviewed.
Congratulations, this task has been completed successfully.