hi out there i do need an file upload script i need some features like : * members login so they can count their files * how many times them files have been downloaded * delete / add new files to them account * more would be helpful here are my examples EXEMPLE1 EXEMPLE2 thanks and your comments are welcomed
You can easily write that in ASP.net Here is some code to start with: <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="showpdf._Default" %> <!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 runat="server"> <title>Untitled Page</title> </head> <body> <form id="form1" runat="server"> <div> <table style="width:100%;"> <tr> <td> Select file</td> <td> </td> <td> </td> </tr> <tr> <td> <asp:FileUpload ID="FileUpload1" runat="server" /> </td> <td> </td> <td> </td> </tr> <tr> <td> Description</td> <td> </td> <td> </td> </tr> <tr> <td> <asp:TextBox ID="TBDescription" runat="server" Width="418px"></asp:TextBox> </td> <td> </td> <td> </td> </tr> <tr> <td> Multiple recipients (up to 10, separate with commas)</td> <td> </td> <td> </td> </tr> <tr> <td> <asp:TextBox ID="TBRecipients" runat="server" Width="415px"></asp:TextBox> </td> <td> </td> <td> </td> </tr> </table> </div> <p> <asp:Button ID="Button1" runat="server" Text="Send File" /> </p> </form> </body> </html> Code behind: Imports System.Net.Mail Imports System.IO Partial Public Class _Default Inherits System.Web.UI.Page Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load End Sub Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click If Not String.IsNullOrEmpty(Me.FileUpload1.FileName) Then Dim myFile As HttpPostedFile = FileUpload1.PostedFile Dim p As String = Server.MapPath(".") myFile.SaveAs(p & "\" & Me.FileUpload1.FileName) Dim htmlbody As String = "Here is the file. click to link to download <a href=""www.yourwebsite.com/" & Me.FileUpload1.FileName & """>Click here</a>" SendMailMessage(Me.TBRecipients.Text, "File", htmlbody, "from@yourwebsite.com", , p & "\" & Me.FileUpload1.FileName) End If End Sub Public Function SendMailMessage(ByVal recepient As String, ByVal subject As String, ByVal body As String, Optional ByVal from As String = "you@yourwebsite.com", Optional ByVal cc As String = "", Optional ByVal bcc As String = "", Optional ByVal AttFile As String = "") As String Dim myMailMessage As New MailMessage() If String.IsNullOrEmpty(AttFile) = False Then Dim at As New Attachment(AttFile) myMailMessage.Attachments.Add(at) End If myMailMessage.From = New MailAddress(from) myMailMessage.To.Add(New MailAddress(recepient)) If Not bcc Is Nothing And bcc <> String.Empty Then myMailMessage.Bcc.Add(New MailAddress(bcc)) End If If Not cc Is Nothing And cc <> String.Empty Then myMailMessage.CC.Add(New MailAddress(cc)) End If myMailMessage.Subject = subject If body.ToLower.Contains("<html>") = False Then body = "<html><head></head><body>" & body & "</body></html>" End If myMailMessage.Body = body myMailMessage.IsBodyHtml = True myMailMessage.Priority = MailPriority.Normal Dim mySmtpClient As New SmtpClient() Dim er As String = Nothing Try mySmtpClient.Send(myMailMessage) Catch ex As Exception er = ex.Message End Try Return (er) End Function End Class
demo: galaxyscripts(dot)com/demo/ download galaxyscripts(dot)com/download/ features galaxyscripts(dot)com/features/ enjoy..its simple good and the best
Just create a login page and put the upload page in a folder that is login protected. If you are interested I can create a mini site for you in aspx.