Jump to content

File upload and download for members


jdowen2211

Recommended Posts

I am building a social network with PHP and MySQL and I want my members to be able to upload most kinds of files to the server then be able to download them at a later date. I want the files to be only visible to that user when they are logged in. I haven't a clue of how to do this and need help from you guys. Maybe a script or some tips, I will be grateful for anything.

Link to comment
Share on other sites

google "PHP file upload" and I'm sure you'll find many examples.

 

just keep filenames in a database associated to each user, so that you only present them when logged in.

 

(just out of curiosity, if you don't have a clue how to upload a file, how on earth are you building an entire social network?)

 

 

Link to comment
Share on other sites

things to consider when allowing random users to upload files:

 

- SIZE : limiting file size

- NAME: changing filename to something unique, so they don't get overwritten

- STORING: placing all in same folder, or a folder for each category, or a folder per user (depending on the amount of files you expect)

- TYPE: limiting allowed file types to avoid malicious files

- BANDWIDTH: limiting number of uploads/downloads per user / per day (avoid bandwidth problems)

- VIRUS: Implementing and anti-virus system on server to scan files

 

hope this helps

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.