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

Problem With Custom ContentProvider

1 Answer 54 Views
Editor
This is a migrated thread and some comments may be shown as answers.
Lance
Top achievements
Rank 1
Lance asked on 21 Sep 2008, 04:59 PM
Hello,
I am trying to create a custom ContentProvider to resize an uploaded image.  I am having a problem getting the physical file name in the StoreFile function.

I have the following code in the StoreFile Method
Dim outFile As String = "" 
 
outFile = MyBase.StoreFile(file, path, name, arguments)  
         

The problem is that outfile returns as a virtual path to the file, and not the physical path.  I have tried mybase.GetAbsolutePath(outfile) but it also just returns the virtual path "/imageUploads/testdir/"

It seems like it should be very straight forward, am I missing something?

1 Answer, 1 is accepted

Sort by
0
Lance
Top achievements
Rank 1
answered on 21 Sep 2008, 05:24 PM
It seems that I was missing something.  I was able to use the cantext.server.mappath to get the actual path.
Tags
Editor
Asked by
Lance
Top achievements
Rank 1
Answers by
Lance
Top achievements
Rank 1
Share this question
or