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
https://forums.phpfreaks.com/topic/242860-file-upload-and-download-for-members/
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?)

 

 

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.