Implement FreeBSD community portal (FCP7) - file upload from the command line 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 .sh/ANSI C and .php programs/scripts which work together.

This is VERY important functionality. Think of sending bug reports and kernel panic messages on a system failure. Users could make their rc.conf fit their 'FreeBSD community portal' settings and make bug reports be sent automatically or semi-automatically, after administrator's confirmation.


The client side must be able to work as a part of the FreeBSD base system. In other words - it is your task to find a way to take whatever we have already in the base system and make it send a file via HTTP. Base system means 'minimal system with no additional applications installed'. Examples of possible solutions: you analyze how fetch(1) program is written and you try to use it's routines/libraries to implement file upload functionality. 


The PHP side of things should be smart enough to receive a request for the file upload. Details on how to handle uploading and saving are explained in detail FCP6 task (SHA1-based naming scheme). Please follow the rules explained there.

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.

It is important to understand that client must work from the bare system installation. 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
FCP7.tar.xz 58.4 KB January 13 2012 05:22 UTC
Gautam on December 10 2011 11:52 UTC FCP6

Could I please get the link of the FCP6 task, and the place where the current code exists (from FCP1-6)? Thanks.

Alex Rucker on January 9 2012 18:51 UTC Task Claimed

I would like to work on this task.

Wojciech A. Koszek on January 9 2012 22:08 UTC Task Assigned

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

Alex Rucker on January 10 2012 02:30 UTC UUID?

Wouldn't it be better to use a UUID for this task? There would almost never be a naming conflict between two files, whereas SHA1 depends only upon the file's content.

Wojciech A. Koszek on January 10 2012 04:28 UTC RE: UUID?

The idea was to make file be saved once, and refer to it by the name. For 2 big files, the space on the disk would be consumed once, since the content would be stored once. The 2 different names would map to the same storage.


Alex Rucker on January 13 2012 05:22 UTC Ready for review

The work on this task is ready to be reviewed.

Wojciech A. Koszek on January 16 2012 09:12 UTC WWW.


You task prooves you have a very good ability to write code. I'm happy with what you have done. 

I will accept your task due to approaching deadline and my inability to assist you a bit more within this week.

My additional comments are below, and you're free to incorporate them, if you want to continue working on this a bit more:

I don't understand why you have to create a socket there. I think you wanted to use separate service (daemon) listening on the separate port (passed to 'upload') for a file submission. However, the task description mentions the submission over HTTP. This is likely to be necessary to get changed. So try to make the 'upload' be a HTTP-compatible client being able to submit the file.

Your directory has a lot of temporary files. Please remove them if possible.



Wojciech A. Koszek on January 16 2012 09:12 UTC Task Closed

Congratulations, this task has been completed successfully.