Try our conversational search powered by Generative AI!

Uploading files using VirtualPathProvider / UnifiedFile



I'm trying to create an "Upload your CV here" functionality for the front-end, but I'd like to upload files and have them sat in a folder in the episerver file manager, rather than in a folder that I create myself.

I've had a read about, and people are saying you can create a unifiedfile object to do it, though I'm not sure how.

I had a look at this article: 

Though I don't understand how you get the correct path to the folder you want, and to upload the file.

I guess I'm after this:

But with EPiServer actually doing the saving and rewriting of the filename.

I want to rewrite the filename like EPiServer's file manager does for security reasons.

Any ideas? 

Thanks very much for any help!


Sep 14, 2009 16:44

1) Where do you want to store the file? In a specific folder where you specify the path or in the current page's folder?

2) What do you mean with with rewrite the filename? Do you want to set it yourself compleatly or just remove unsafe characters from the filename?

Sep 15, 2009 14:21
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.