First off let me just say, i dont want anyone to post solutions because I get more satisfaction coding myself so I would appreciate guidance and ideas.
So i want to build a site, that lets me upload a file, store it, display a list of all uploaded files, and then download a selected file.
Any help as to how I may do this?
In more detail.
step 1:
user selects a button upload file.
step 1: it shows the window where they can browse through their locally stored files and select one of them.
step 3:
They click upload.
step 4: this gets stored (perhaps in mysql database, dont know much about how to do this).
step 5: The user clicks the button ‘browse uploaded files’
step 6: the user is shown a list of all the uploaded files
step 7: the user selects one of the files and clicks download.
I hope this has made it clearer
Also I just would like someone to show me where to start really.
Thankyou
Ok so you request some guidance rather then code, that’s good because no one is going to create you the source for this type of site anyway without some sort of revenue.
please don’t take this as an offence but your obviously lacking the skills to develop a system that can handle this sort of user iterations so the below will seem alien to yourself but for others that may be reading it it could help them more then it will help you.
Begin
What i would advise is you break down the site into components, and then look at each component with a little more detail.
I would break the site’s object down into the following sections:
there’s a lot more to be added but the idea is to look at each component in detail, if you have to get pen and paper then do so, it will only make things easier.
Ok so lets start with the Database, the database would probably be pretty simple, MySQL is usually a good choice these days, but there are alternatives.
For the structure you would need to look at all the other aspecs of the site first to be able to understand what is required of the database.
As for the Uploading / Downloading I would not rely on Apache for this, Apache spawns a new thread per request and when sending large file with speed limitations on them threads stay active for longer so potentially you could have thousands of download / upload threads and cause your servers to be extremely slow.
I would look at libev as a concept, which as been incorporated into Node which does not use threads and utilizes the Disk I/O
libev + node is an event loop structure that runs in a single thread, you then assign callbacks to a disk read for example, then when the disk has spun up and is ready to send you a chunk of data your callback is called, but during the time you assign the callback and the time the callback was actually called the process has handle hundreds of other callbacks you may have set/
The users would need to be placed out within a structure chart, creating a plan of how the users would be organized within your structure would help you then understand revenue avenues.
Firstly you should start with a framework that can help you build quick and scalable applications of which you have a lot of control over, such as Codeigniter, this will help you build up a framework for your site to run around, now you can also use Node.JS For this but for security reasons I would advise you only use Node for the passing of file data to the client.
i think you get the idea 🙂