954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

file upload script for music files and video files

Hi,
I am currently in my final year doing an eportfolio system as my final year project and this system will allow students to do things such as upload images, academic documents in say word,pdf files. Also it would allow students to set privacy issues to each document in their page. Say for example if i upload one file to my page, the person can set that document to be viewed by certain people. the user groups i have is,public,private,registered users and special people.

I just want to ask anyone out there if you have any php script that can help me upload music $ video files to my database and be able to download them. the script i have does upload them but i dont know when it comes to downloading them it doesn't download the files successfully.

also i am finding it difficult to implement a database design for the privacy issues i explained above.

say for instance someone sets a particular document to be viewed only some special people, how do I implement this in the database. My idea is that if someone sets a document to special people, that special person is created and then there will be a table that will created just for special persons that people have created and then there will be another table that lists all the documents be it word,image,video files etc and with the respective people that can view them.

If anyone has done this before please can u help me out by giving a suitable database design or explanation on how to go bout this.

omesanni
Newbie Poster
4 posts since Apr 2007
Reputation Points: 10
Solved Threads: 0
 

first. create dropdownlist which contains details about privacy.. assign an id and create a table about uploading to store paths and uploaders' id, privacy etc.

1 > Public
2 > Private
3 > Registered

as you upload the file ask uploader to set its privacy level... and save the file path to your db and upload the file.. thats all.

while people browsing check that privacy id and do whatever you want...

fatihpiristine
Posting Whiz in Training
283 posts since Sep 2007
Reputation Points: 6
Solved Threads: 19
 

Hello,

Uploading The File :
1. uploade the file and stored this info in a database
i. fileID (a unique identifier -this can get autogenerated )
ii. filename - mySong.mp3 (use this cmd = $_FILES['file']['name'] )
iii. file path - where the file is stored (e.g. \web_root\uploadedFile\)
iv.file full path - (eg \web_root\uploadedFile\mySong.mp3)
v. file Size - in bytes (use this cmd = $_FILES['file']['size'] )
vi. file type - (e.g. mp3, doc, mov,pdf) (use this cmd = $_FILES['file']['type'] )

* note that $_FILE['file']['size']; the first 'file' param is the name you gave your file box =

* also note that the "file path field may not be usefull unless you want to do more processing with your application by dynamically specifying different paths

To download an uploaded file (say mySong.mp3) you might do this

1. List the uploaded file on your web page with an tag. e.g

emmanueloladele
Newbie Poster
15 posts since Nov 2007
Reputation Points: 10
Solved Threads: 1
 

hi i know the code for all upload

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
 <form enctype="multipart/form-data" action="upload.php" method="POST">
 Please choose a file: <input name="uploaded" type="file" />
 <input type="submit" value="Upload" />
 </form> 
</body>
</html>


-------------------another file

<?php 
 $target = "upload/"; 
 $target = $target . basename( $_FILES['uploaded']['name']) ; 
 $ok=1; 
 if(move_uploaded_file($_FILES['uploaded']['tmp_name'], $target)) 
 {
 echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
 } 
 else {
 echo "Sorry, there was a problem uploading your file.";
 }
 ?>
hbhbjhjhgdfhgdf
Newbie Poster
1 post since Jun 2010
Reputation Points: 10
Solved Threads: 0
 

It's very useful.Thanks for to build this site.i like this site

rajlaxmi sharma
Newbie Poster
4 posts since Aug 2010
Reputation Points: 10
Solved Threads: 0
 

how to display the uploaded video file

kichi12
Newbie Poster
1 post since May 2011
Reputation Points: 10
Solved Threads: 0
 

help me

how do yo do for upload video and convert to flv ????

mail : [snipped]

mina gharache
Newbie Poster
2 posts since Jul 2011
Reputation Points: 10
Solved Threads: 0
 

i have been trying to upload music with the above code but the file will not upload but all the picture upload are successfully .

i need some help here i want to upload music file to a directory in my server but i have been having problems with it.

cnwanjah
Newbie Poster
1 post since Nov 2011
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You