This is a migrated thread and some comments may be shown as answers.

Help with new RadUpload scenario

2 Answers 43 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Missing User
Missing User asked on 03 Oct 2011, 07:42 PM
Hello!
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
   /User1
      /User1Files
  /User2
      /User2Files

Project 2
  /User3
    /User3Files

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 Answers, 1 is accepted

Sort by
0
Accepted
Alex Fidanov
Telerik team
answered on 06 Oct 2011, 03:10 PM
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?

Greetings,
Alex Fidanov
the Telerik team

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

0
Missing User
answered on 07 Oct 2011, 01:13 PM
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:

 

http://www.telerik.com/support/kb/silverlight/upload/uploadhandler-uniquefilename.aspx

Thanks again!

Tags
Upload
Asked by
Missing User
Answers by
Alex Fidanov
Telerik team
Missing User
Share this question
or