Help with new RadUpload scenario

3 posts, 1 answers
  1. Joao Paulo Grassi
    Joao Paulo Grassi avatar
    98 posts
    Member since:
    Feb 2011

    Posted 03 Oct 2011 Link to this post

    In my Project i have a RadUpload working just fine, today we save the files uploaded into a SQL Server database, but now we have to change this scenario a little.

    What i need to do is, implement some way to make a backup from the already saved files, but with the application that we have now the user administrador have to download 1 by 1 file per time and this isn't a better way.

    So, after thinking for a while I get an idea, IF instead upload files to SQL I create folders in the Server and save the files there. But there's a problem, i can't just put the files togheter, I  need to separate then by Project, and User like this.

    Project 1

    Project 2

    And there's other question, since i save the files on SQL Server, each file is a register and has a ID(GUID) and i can find the file using his ID, but if I start to save the Files just in the server how do I connect the Uploaded File to a SQL Server Register? Because in the future the user can Download that file and without the ID how can i find this file into the server?

    I don't know if i was clear on my example, but If I manage to create this structure, the Administrador goes to the Server and get the Files that are already organized by Projects.

    Please can you help me, in this case?

    Thank you very much!

  2. Answer
    Alex Fidanov
    Alex Fidanov avatar
    637 posts

    Posted 06 Oct 2011 Link to this post

    Hi Joao Paulo Grassi,

    As far as I was able to understand your scenario, you want to create a backup file for each file you upload. Is it a strict requirement to arrange the files into subfolders based on a specific structure?
    You mentioned, that each file has an unique ID. You can use this ID as prefix for the backed up files and store them in the same folder. This way, you will be able to keep the mapping between the ids in the database and the files on the server.

    Do you think this will be acceptable in your scenario?

    Alex Fidanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  3. Joao Paulo Grassi
    Joao Paulo Grassi avatar
    98 posts
    Member since:
    Feb 2011

    Posted 07 Oct 2011 Link to this post

    Hi Alex!

    Thank you for your support, i manage to implement the scenario, i override the SaveChunck method and there i create the directories when i need.

    For link the files to the Database register, i use a diferente approach, when i save the register i also save the URL of the file on the server, Then i create on my GridView a Hiperlink button that call's the URL saved previously.

    I also follow this blog post to create unique names for my files:


    Thanks again!

Back to Top