问题
I'm running a EpiServer project where i want to take use of Amazon S3, to host images, etc... there will be alot of images that will exist from the pagefiles directory.
I've downloaded NuGet for Visual Studio and added the AWSSDK and Geta.AmazonS3 libraries to be able to add Amazon S3 as virtual path provider.
I added this line to EpiServer.config:
<add showInFileManager="true" virtualName="AWS Global Files" virtualPath="~/AWS-S3/" bucketName="s3bucket" verticalDir="CS" bypassAccessCheck="true" hostName="xxxxxxxxx.cloudfront.net" maxVersions="5" name="AWSSiteGlobalFiles" type="Geta.AmazonS3.Hosting.AmazonS3VirtualPathProvider,Geta.AmazonS3" awsAccessKey="xxxxxxxxxxxxx" awsSecretKey="xxxxxxxxxxxxxxxx" physicalPath="" />
And it works fine for global files.
But when i try to add the same for pagefiles i get the message:
"The VirtualPathProvider configured to handle page files must return directories that implement IPageDirectory".
<siteSettings
enableScheduler="true"
pageFolderVirtualPathProvider="AWSSitePageFiles" />
<add showInFileManager="true" virtualName="AWS Page Files" virtualPath="~/AWS-S3/" bucketName="bucketpage" name="AWSSitePageFiles" verticalDir="CS" bypassAccessCheck="true" hostName="xxxxxxx.cloudfront.net" maxVersions="5" type="Geta.AmazonS3.Hosting.AmazonS3VirtualPathProvider,Geta.AmazonS3" awsAccessKey="xxxxxxxxxxxxxxxxxxx" awsSecretKey="xxxxxxxxxxxxx" physicalPath="" />
Anyone have an idea of what could be wrong, or what needs to be done?
By looking at the library it looks like it implements IPageDirectory (Or at least Unified File System). Geta.AmazonS3 Library
来源:https://stackoverflow.com/questions/14147288/how-to-add-a-working-aws-s3-virtualpath-provider-for-episerver-pagefiles