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

Need Image Source in DeleteFile Function

3 Answers 179 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Kim
Top achievements
Rank 1
Kim asked on 27 Jul 2009, 02:37 PM
Does anybody know how to get the image source path in the DeleteFile function of DBContentProvider.cs?

We have a table with all of the image names and paths in the database.  When a user uploads a new image we rename it from "MyFirstPic.jpg" to 25.jpg, where 25 is the picture id in the database.  We store the original name so that the user can see it when they look through the image manager.

I am adding code to the DeleteFile function but the variable that is getting passed is the image path with the old image name (MyFirstPic.jpg) not the new (25.jpg).  How do I get the actual name (25.jpg)?  
Thanks

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 30 Jul 2009, 06:51 AM
Hi Kim,

The File Explorer control is designed with the idea that the virtual path of every item is unique.
This means that it is not possible to have two images with URL: /images/MyFirstPic.jpg
If this requirement is fulfilled then you will be able to find the new image name from the old one.

Best regards,
Rumen
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Kim
Top achievements
Rank 1
answered on 30 Jul 2009, 05:18 PM
Is there a way to change the look/layout of the Upload Dialog box from the image manager?
0
Fiko
Telerik team
answered on 04 Aug 2009, 01:27 PM
Hi Kim,

The control behind the ImageManager is RadFileExplorer. Your scenario is possible and I believe that this and this forum threads will be of help. Additionally, you could use your custom skin for the RadUpload control and set it in the code behind as follows:

RadFileExplorer1.Upload.EnableEmbeddedSkins = false;  
RadFileExplorer1.Upload.Skin = "ACustomSkin"

I hope this helps.

Regards,
Fiko
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Editor
Asked by
Kim
Top achievements
Rank 1
Answers by
Rumen
Telerik team
Kim
Top achievements
Rank 1
Fiko
Telerik team
Share this question
or