<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Page Folders and Uploading of files in EPiServer</title>
	<atom:link href="http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/</link>
	<description>Chatter about EPiServer, ASP.NET, CSS and Web Development.</description>
	<lastBuildDate>Wed, 21 Dec 2011 01:21:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Gurmeet</title>
		<link>http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/comment-page-1/#comment-4214</link>
		<dc:creator>Gurmeet</dc:creator>
		<pubDate>Tue, 30 Aug 2011 10:48:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/#comment-4214</guid>
		<description>Hi Fredrik,
The requirement in my case is that i need to upload the video file and  its thumbnail image so that it can be displayed in Video Gallery page created by user. Now the concern is how can i put 2 upload controls in Xform (one for video file and other for its thumbnail image). Also is there any way to bind the dropdown list in Xforms with the appsettings values defined in Web.config

Regards,
Gurmeet</description>
		<content:encoded><![CDATA[<p>Hi Fredrik,<br />
The requirement in my case is that i need to upload the video file and  its thumbnail image so that it can be displayed in Video Gallery page created by user. Now the concern is how can i put 2 upload controls in Xform (one for video file and other for its thumbnail image). Also is there any way to bind the dropdown list in Xforms with the appsettings values defined in Web.config</p>
<p>Regards,<br />
Gurmeet</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dave Bartlett</title>
		<link>http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/comment-page-1/#comment-4174</link>
		<dc:creator>Dave Bartlett</dc:creator>
		<pubDate>Wed, 01 Jun 2011 00:06:32 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/#comment-4174</guid>
		<description>Thanks Fredrik for saving me precious hours yet again!</description>
		<content:encoded><![CDATA[<p>Thanks Fredrik for saving me precious hours yet again!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EPiServer Developer Resources &#124; Frederik Vig - ASP.NET developer</title>
		<link>http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/comment-page-1/#comment-3774</link>
		<dc:creator>EPiServer Developer Resources &#124; Frederik Vig - ASP.NET developer</dc:creator>
		<pubDate>Sat, 29 May 2010 16:22:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/#comment-3774</guid>
		<description>[...] Page Folders and Uploading of files in EPiServer [...]</description>
		<content:encoded><![CDATA[<p>[...] Page Folders and Uploading of files in EPiServer [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fredrik Fredrik Haglund</title>
		<link>http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/comment-page-1/#comment-3368</link>
		<dc:creator>Fredrik Fredrik Haglund</dc:creator>
		<pubDate>Thu, 24 Dec 2009 01:29:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/#comment-3368</guid>
		<description>Nope, just add a reference to EPiServer.Framework assembly.</description>
		<content:encoded><![CDATA[<p>Nope, just add a reference to EPiServer.Framework assembly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andreas Ek</title>
		<link>http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/comment-page-1/#comment-3366</link>
		<dc:creator>Andreas Ek</dc:creator>
		<pubDate>Wed, 23 Dec 2009 22:21:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/#comment-3366</guid>
		<description>EPiServer.Web.Hosting.GenericHostingEnvironment.VirtualPathProvider is missing in EPiServer 6.</description>
		<content:encoded><![CDATA[<p>EPiServer.Web.Hosting.GenericHostingEnvironment.VirtualPathProvider is missing in EPiServer 6.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lei</title>
		<link>http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/comment-page-1/#comment-3318</link>
		<dc:creator>Lei</dc:creator>
		<pubDate>Fri, 09 Oct 2009 11:41:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/#comment-3318</guid>
		<description>Hej Fredrik

I think I fixed all those problems now, so no need to reply :)

Thank you very much for the article, they did helped a lot!!</description>
		<content:encoded><![CDATA[<p>Hej Fredrik</p>
<p>I think I fixed all those problems now, so no need to reply <img src='http://blog.fredrikhaglund.se/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thank you very much for the article, they did helped a lot!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lei</title>
		<link>http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/comment-page-1/#comment-3317</link>
		<dc:creator>Lei</dc:creator>
		<pubDate>Thu, 08 Oct 2009 15:26:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/#comment-3317</guid>
		<description>when I got ur mail, I already did some tries, the problem now is, the file is surely uploaded to the vpp folder under the site, but it creates its own folder, and the Page File is actually empty, and then I create the folder from episerver editor mode and put a file then, physically, it creates another folder with the file in it, apparent that is the real page file folder, the one created by the code previously was wrong. so my question is how to create Page File folder and after uploading the file it could be accessed from Episerver&#039;s file manager?

-----------------------------------------------------------------------------------------
Origianl question:

Hi Fredrik, got a few questions regarding to this:

Basically, the requirement for my case is that an end user /visitor, can post an article and upload a photo with it, the image should be uploaded to the vpp folder and should be available in the Episerver File Managment, and when then page is deleted, the image should be deleted also. Your article mostly explains this question right?

When uploading file to a page, the page has to be physically existed first right? In my case, it&#039;s like put title, put test, upload a foto, then press the create button and create a page,so the upload foto is a step before the page is physically created, is it possible to do this?  ok the trick will be put the upload code after the page creation code I guess?

Normally, when end user uploading file is involved with a site, do we program a seperate unit or we do everything via Episerver&#039;s file manager?  Is there any exiting units we can use directly or we have to program ourselve like ur blog says?</description>
		<content:encoded><![CDATA[<p>when I got ur mail, I already did some tries, the problem now is, the file is surely uploaded to the vpp folder under the site, but it creates its own folder, and the Page File is actually empty, and then I create the folder from episerver editor mode and put a file then, physically, it creates another folder with the file in it, apparent that is the real page file folder, the one created by the code previously was wrong. so my question is how to create Page File folder and after uploading the file it could be accessed from Episerver&#8217;s file manager?</p>
<p>&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
Origianl question:</p>
<p>Hi Fredrik, got a few questions regarding to this:</p>
<p>Basically, the requirement for my case is that an end user /visitor, can post an article and upload a photo with it, the image should be uploaded to the vpp folder and should be available in the Episerver File Managment, and when then page is deleted, the image should be deleted also. Your article mostly explains this question right?</p>
<p>When uploading file to a page, the page has to be physically existed first right? In my case, it&#8217;s like put title, put test, upload a foto, then press the create button and create a page,so the upload foto is a step before the page is physically created, is it possible to do this?  ok the trick will be put the upload code after the page creation code I guess?</p>
<p>Normally, when end user uploading file is involved with a site, do we program a seperate unit or we do everything via Episerver&#8217;s file manager?  Is there any exiting units we can use directly or we have to program ourselve like ur blog says?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fredrik Haglund</title>
		<link>http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/comment-page-1/#comment-3231</link>
		<dc:creator>Fredrik Haglund</dc:creator>
		<pubDate>Thu, 19 Mar 2009 20:11:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/#comment-3231</guid>
		<description>Thanks!

Obviously a little tricky to do that. I guess the only way is to impersonate a user with admin rights (that is a user that can access the EPiServer admin folder according to web.config) during that request.

Change principal using PrincipalInfo.CurrentPrincipal in a try-finally block and be careful to restore the original.</description>
		<content:encoded><![CDATA[<p>Thanks!</p>
<p>Obviously a little tricky to do that. I guess the only way is to impersonate a user with admin rights (that is a user that can access the EPiServer admin folder according to web.config) during that request.</p>
<p>Change principal using PrincipalInfo.CurrentPrincipal in a try-finally block and be careful to restore the original.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christoffer Nordling</title>
		<link>http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/comment-page-1/#comment-3230</link>
		<dc:creator>Christoffer Nordling</dc:creator>
		<pubDate>Thu, 19 Mar 2009 15:59:10 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/#comment-3230</guid>
		<description>Hi Fredrik
Have you found any way to access a folder that you do not have access to read the folder?
I´ve added an upload function to xforms. The uploaded files are saved in a vpp folder and my thought was that they may want to remove everyones read rights on that folder. But that does not seem possible. GetUnifiedDirectory(folder); does not seem to have any way of bypassing the rights.

by the way, thx for a great blog :)</description>
		<content:encoded><![CDATA[<p>Hi Fredrik<br />
Have you found any way to access a folder that you do not have access to read the folder?<br />
I´ve added an upload function to xforms. The uploaded files are saved in a vpp folder and my thought was that they may want to remove everyones read rights on that folder. But that does not seem possible. GetUnifiedDirectory(folder); does not seem to have any way of bypassing the rights.</p>
<p>by the way, thx for a great blog <img src='http://blog.fredrikhaglund.se/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fredrik Haglund</title>
		<link>http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/comment-page-1/#comment-3029</link>
		<dc:creator>Fredrik Haglund</dc:creator>
		<pubDate>Mon, 22 Sep 2008 16:10:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/#comment-3029</guid>
		<description>Per, you should be able to use System.Web.Hosting.HostingEnvironment directly with the same result. I did not look at the documention for that class but it is not obsolete in the upcoming R2 release anyway...

BypassAccessCheck property is read only on the VirtualPathProvider since it is configured from web.config but BypassAccessCheck can be read and written on UnifiedDirectory and UnifiedFile.

/Fredrik</description>
		<content:encoded><![CDATA[<p>Per, you should be able to use System.Web.Hosting.HostingEnvironment directly with the same result. I did not look at the documention for that class but it is not obsolete in the upcoming R2 release anyway&#8230;</p>
<p>BypassAccessCheck property is read only on the VirtualPathProvider since it is configured from web.config but BypassAccessCheck can be read and written on UnifiedDirectory and UnifiedFile.</p>
<p>/Fredrik</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Per Edman</title>
		<link>http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/comment-page-1/#comment-3026</link>
		<dc:creator>Per Edman</dc:creator>
		<pubDate>Mon, 22 Sep 2008 10:48:57 +0000</pubDate>
		<guid isPermaLink="false">http://blog.fredrikhaglund.se/blog/2008/09/05/page-folders-and-uploading-of-files-in-episerver/#comment-3026</guid>
		<description>The GenericHostingEnvironment will be Obsolite in a near feature and BypassAccessCheck is ReadOnly - Do have any suggestions on how to workaround these issues?</description>
		<content:encoded><![CDATA[<p>The GenericHostingEnvironment will be Obsolite in a near feature and BypassAccessCheck is ReadOnly &#8211; Do have any suggestions on how to workaround these issues?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

