سؤال

Wanting to use Orchard 1.7 with Media storage on S3 (as I'm deploying to AppHarbor)

So far I'm looking at the S3 Storage provider But its a bit out of date.

Has anyone done this ? is there a better way to use S3 with the new media manager?

I've got images uploading to s3, but they don't display when I click the folder.

here is the Gist of my updated S3Provider

Missing methods for create file, rename folder, get file, and Get storage path. any help on how to complete these would be appreciated.... however stepping through the debugger in VS this doesn't seem to be the root cause of my displaying images issue above.

Edit

Looks like the file is up loading to s3 but not to the database, due to the GetFile method throwing an error...

Edit 2

Added some code to the Get file method. Now that works; (gist updated) Can up load images. However the thumbnails are still not working, they just come back as empty tags ...Think this is because the media manager is using the Open get method - which is supposed to open a file so you can write a stream to it. Don't know how to achieve this with S3... any ideas welcome

هل كانت مفيدة؟

المحلول

As Part of the AWSSKD NuGet package version 1.5.28.3 you can access a S3FileInfo object. I've used this in my S3 Storage File and updated the S3 Storage provider.

This seem to work, need to do a bit more testing on it.

NOTE: I had to add some code on the GetFile Method to ensure the permissions where set correctly otherwise the updating of thumbnails overwrote permissions on the file.... I'm sure there is a better way to do this.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top