File Upload Manager

7 posts, 0 answers
  1. BSolveIT
    BSolveIT avatar
    49 posts
    Member since:
    Aug 2006

    Posted 07 Dec 2006 Link to this post

    Requirements

    r.a.d.controls version

    r.a.d.ajax v1.5.3
    r.a.d.combobox v2.5.3
    r.a.d.grid v4.0.3
    r.a.d.splitter v1.0.3
    r.a.d.upload v2.1.3
    r.a.d.treeview v6.0.2

    .NET version

    2.0

    Visual Studio version

    2005

    programming language

    VB

    browser support

    all browsers supported by r.a.d.controls


     
    PROJECT DESCRIPTION
    This is a simple file upload manager that uses a number of r.a.d.controls to achieve a very pleasing yet simple design interface, including the r.a.d.splitter with sliding panes - one of which also uses the r.a.d.treeview to represent files and folders.  The treeview is drag and drop enabled, and also incorporates useful context menus for creating new folders, renaming files or folders, and deleting files or folders (as opposed to dragging them to the recycle bin which is also represented on the treeview).  Files can also be downloaded using the context menu.

    The application also incorporates simple user administration with the r.a.d.grid control.  Users are given either "admin" or "user" level access to the application.  The difference being that admin users can see all files and folders in the upload area, but standard users can only see their own files and folders.

    Users can upload any file type, although that could be locked down, but has been left open given that access to the system has to be granted by an admin prior to the user having access.

    User admin uses a SQL Server Express 2005 database, and the usual network service access needs to be granted to the "~/incoming" folder.

    Users and admins must login to the system on the initial page using email address and password.  There are 2 accounts setup in the database for testing:

    User
    login:  user@test.com
    password:  password

    Admin
    login:  admin@test.com
    password:  password

    Upon logging in, the application will automatically create a folder (if it doesn't already exist) named after the users company name.  All the users uploaded files will go directly to that folder by default, although they can than be drag & dropped to anywhere that the user has access too, or renamed, or deleted.

    The application has a professional, production level, look and feel thanks to the r.a.d.controls and appropriate use of icons and graphics throughout.


    Screenshots

    Login Screen:


    Upload Functionality:


    Admin page:
  2. sayitfast
    sayitfast avatar
    57 posts
    Member since:
    Oct 2006

    Posted 15 Jan 2007 Link to this post

    This is a great application... Is the author still around? I have a question I would like to ask.
  3. BSolveIT
    BSolveIT avatar
    49 posts
    Member since:
    Aug 2006

    Posted 15 Jan 2007 Link to this post

    Hello sayitfast!

    Yes, I'm still around, and happy to help in any way I can.

    Regards,
    Mark McNeece
    BSolve IT.
  4. sayitfast
    sayitfast avatar
    57 posts
    Member since:
    Oct 2006

    Posted 15 Jan 2007 Link to this post

    Hello,

    Thanks for the fast reply and sharing this app!  I was wondering if you have a version that does not use the login or maybe uses the .Net 2 Roles & Auth scheme.

    I attempted to strip out the login info and I have it working but with errors uploading. 

    Thanks again,
    Rhett
    sayitfast@sayitfast.com
  5. BSolveIT
    BSolveIT avatar
    49 posts
    Member since:
    Aug 2006

    Posted 15 Jan 2007 Link to this post

    Hi Rhett

    The application does require users to login so that it knows where to save their uploaded files, and of course which folders to hide / show.

    The errors your getting on uploading, is likely because you need to remove/comment out the code in Private Sub InitializeComponent().

    With that code commented out, all uploads will go to the ~/incoming folder by default without any errors.

    You'll maybe want to add a context menu item for folders, to allow users to specify where their uploads should go?  If so, add the following code in the Page_Load at the end of the Folders Menu creation code:

    Dim fcmi4 As New ContextMenuItem("Set Upload Folder")  
    fcmi4.PostBack = True 
    FolderCm.Items.Add(fcmi4)  
     

    Then, update the handler for the ContextClicked as below:
        Protected Sub ContextClicked(ByVal sender As Object, ByVal e As RadTreeNodeEventArgs)  
            Dim thenode As RadTreeNode = RadTree1.SelectedNode  
            Select Case (e.ContextMenuItemText)  
                Case "Delete File"  
                    Dim parentfolder As String = RadTree1.SelectedNode.Parent.Text  
                    Dim path As String = Server.MapPath("~/incoming/") & parentfolder & "/" & thenode.Text  
                    File.Delete(path)  
                    RadTree1.SelectedNode.Parent.Nodes.Remove(RadTree1.SelectedNode)  
                Case "Delete Folder"  
                    Directory.Delete(thenode.Value)  
                    RadTree1.SelectedNode.Parent.Nodes.Remove(RadTree1.SelectedNode)  
                Case "Create New Folder"  
                    Directory.CreateDirectory(thenode.Value & "\New Folder")  
                    BindResults()  
                Case "Set Upload Folder"  
                    Dim nd As New DirectoryInfo(Server.MapPath(".") & "/incoming/" & thenode.Text)  
                    If nd.Exists = False Then  
                        nd.Create()  
                    End If  
                    upload1.TargetFolder = "~/incoming/" & thenode.Text & "/"  
            End Select  
        End Sub  
     

    That should do it. 

    Your quite right, it could be re-configured for .Net 2.0 users & roles auth scheme, but it's not something I've done as yet I'm afraid.  But your right, I should!

    I'll try to make time for it as soon as I can and post the updated version when it's ready.  Sorry, I can't be certain  when that will be right now, but I will do it.

    Let me know if the code updates help, or if you need anymore help?

    Regards
    Mark
    BSolve IT
  6. sayitfast
    sayitfast avatar
    57 posts
    Member since:
    Oct 2006

    Posted 16 Jan 2007 Link to this post

    Thanks!  I will give it a shot....
  7. BSolveIT
    BSolveIT avatar
    49 posts
    Member since:
    Aug 2006

    Posted 20 Aug 2007 Link to this post

    Just to let you know I've posted an updated version of this File Upload Manager application, that is based on the .NET Memberships and Roles system.

    http://www.telerik.com/community/code-library/submission/b311D-hkedg.aspx

    Regards
    Mark McNeece
    BSolve IT Limited
Back to Top