Mencari Video Upload Script - Free or Open Source

CG Sponsors




emir

Active+ Member
Joined
Dec 30, 2008
Messages
4,631
Reaction score
40
Points
30
salam...

Aku ade projek kat opis nih yg memerlukan satu script... run kat php n mysql... utk user boleh upload file dlm format video (mp4, flv, wmv etc.)

Script tu simple pun xpe as long user boleh upload file2 tu... and admin boleh nmpk file2 tu dlm folder in server.

Aku dah try google tapi x jumpe yg sesuai, hrp2 kwn2 yg ensem n cun boleh menolong...

Jasa baik korang Allah jek yg dpt balas...:)
 
Last edited:
Sponsored Post

mutanic

Super Active Member
Joined
May 24, 2009
Messages
5,537
Reaction score
212
Points
73
C# boleh x TT? ni contoh aku park terus dalam document library kat Sharepoint, ada gak lagi satu park file kat directory dlm server nnt aku godek balik...requirement TT ni nak upload file dalam SQL ka?

coding cap ayam jer, sori aku x kemaskan sket harap TT faham laa...

public void ButtonUploadFile_Click(object sender, System.EventArgs e)
{
try
{
if (FileUploadExcel.HasFile)
{
string strFileType = System.IO.Path.GetExtension(FileUploadExcel.FileName).ToString().ToLower();

if (strFileType.Trim() == ".xlsx" || strFileType.Trim() == ".xls")
{
tempValue.Text = FileUploadExcel.PostedFile.FileName.ToString();
tempFileName.Text = FileUploadExcel.FileName.ToString();
tempType.Text = FileUploadExcel.PostedFile.ContentType.ToString();
tempSize.Text = FileUploadExcel.PostedFile.ContentLength.ToString();
tempBytes.Text = FileUploadExcel.FileBytes.ToString();

SPWeb spWeb = SPContext.Current.Web;

spWeb.AllowUnsafeUpdates = true;

SPDocumentLibrary spDocLib = spWeb.Lists["Archive"] as SPDocumentLibrary;

//Get file extension ( *.xls OR *.xlsx OR whatever files )
string fileExtension = FileUploadExcel.FileName.Substring(FileUploadExcel.FileName.IndexOf("."));
byte[] fileBytes = FileUploadExcel.FileBytes;
string strURL = spDocLib.RootFolder.Url + "/" + tempFileName.Text;

SPFile spFile = spDocLib.RootFolder.Files.Add(strURL, fileBytes, true);
spFile.Update();

spWeb.AllowUnsafeUpdates = false;

LabelUpload.Text = tempValue.Text;
lblMessage.Visible = true;
lblMessage.ForeColor = System.Drawing.Color.Green;
lblMessage.Text = "<B>File Name : </B>" + FileUploadExcel.PostedFile.FileName + "<BR><B>File Type : </B>" + FileUploadExcel.PostedFile.ContentType + "<BR><B>File Size : </B>" + FileUploadExcel.PostedFile.ContentLength + " kb<BR><BR>File successfully uploaded to server.";
}
else
{
PanelView.Visible = false;
LabelUpload.Visible = false;
lblMessage.Text = "Please select Excel (.xls) document only.";
lblMessage.ForeColor = System.Drawing.Color.Red;
lblMessage.Visible = true;
}
}
else
{
PanelView.Visible = false;
lblMessage.Visible = false;
LabelUpload.Visible = true;
LabelUpload.ForeColor = System.Drawing.Color.Red;
LabelUpload.Text = "Please select a file to upload.";
}
}
catch (Exception ex)
{
LabelUpload.Visible = true;
LabelUpload.Text = "Error: " + ex.Message.ToString();
}
}
 

emir

Active+ Member
Joined
Dec 30, 2008
Messages
4,631
Reaction score
40
Points
30
tq tuan...

xpe aku buat simple jek based dari w3school... hihihi
 

Spellweaver

Freshie
Joined
Oct 31, 2019
Messages
30
Reaction score
1
Points
11
What are you trying to achieve honestly ? Something which I still do not get like for example some video hosting site ? It's much more harder to do, that's why there are much less of them than images and hosting websites so I am really not that sure anyway.
 
Sponsored Post
Top
Log in Register