elijahglover / umbraco-s3-provider Goto Github PK
View Code? Open in Web Editor NEWAmazon Web Services S3 IFileSystem provider for Umbraco
Amazon Web Services S3 IFileSystem provider for Umbraco
Hi,
So I am running into an issue. I have a website that multiple developers are working locally on and pushing changes to Github. I have an existing project, which I moved the media folder into S3. After I made the changes in FileSystemProviders.config and started uploading media, it went into my S3 bucket okay, but instead of creating a new folder under media, it puts the image in the already existing 1001 folder, which creates and issue because only one image can have that id.
I did a test and uploaded a bunch of test images to trick it into finally getting through all the existing image folders, which it did, and then it started creating new ones. Then I pushed everything to Github, and when another developer synced and tested the media upload, it defaulted back to folder 1001. Wondering if there is a reason why it is doing this. Please let me know if any of this makes sense.
Thanks!
John
I have been having an issue with creating media content.
I get a 500 response from "/umbraco/backoffice/UmbracoApi/Media/PostAddFile?origin=blueimp"
I can see this in the response;
)]}',
{
"Message":"An error has occurred.",
"ExceptionMessage":"Object reference not set to an instance of an object.",
"ExceptionType":"System.NullReferenceException",
"StackTrace":" at Umbraco.Web.WebApi.Filters.FileUploadCleanupFilterAttribute.OnActionExecuted(HttpActionExecutedContext actionExecutedContext)\r\n at System.Web.Http.Filters.ActionFilterAttribute.CallOnActionExecuted(HttpActionContext actionContext, HttpResponseMessage response, Exception exception)\r\n at System.Web.Http.Filters.ActionFilterAttribute.<>c__DisplayClass2.<System.Web.Http.Filters.IActionFilter.ExecuteActionFilterAsync>b__1(CatchInfo`1 info)\r\n at System.Threading.Tasks.TaskHelpersExtensions.<>c__DisplayClass4`1.<Catch>b__3()\r\n at System.Threading.Tasks.TaskHelpersExtensions.<>c__DisplayClass9`1.<CatchImplContinuation>b__8(Object state)"
}
For the time being, I am putting the AWS keys in the web.config.
I can confirm that changing FileSystemProviders.config back to default, images are saved to file but that could be irrelevant.
Any ideas what might be going wrong here?
Thanks
Basem
if i see my media url path in inspect it showing my url with subfolder like this http://goairstage.inspire.technology/services/priority-check-in/
how can i change my url into http://mybucketname/services/priority-check-in/
If you delete an image with a 4 digit media link id in a environment where you also have 5 digit media ids then the 5 digit media items can be deleted as well.
If any 5 digit media link ids start with the 4 digit media link id then they are also removed.
For example I delete image with media link id of 1001.
In AWS folder /1001/ and all contents below it is deleted (thumbnails, etc)
But also deleted is folder /10011/, /10015/, etc.
This is a significant flaw and can (and has) lead to a vast amount of images being incorrectly deleted.
Have tried to upgrade a project from Umbraco 7.4.3 to 7.5.x and find I get 404s on images. However, when you include a query string for image processor, the images are returned. Has this been tested against 7.5.x?
Hi,
I have followed all the instructions and using Umbraco 7.12.2 and I configured all the settings for Virtual Path Provider with ImageProcessor. When I upload an image in backoffice I can see the thumbnail and it is uploaded properly in bucket. But when I click on the image that gives 404 error. I can access it though the bucket url and the relative url from the site with querystring i.e. /media/1000/test.jpg?width=1000, but not without querystring.
Please, could anyone help with this?
Thank you.
Thanks for this component!
I have installed your provider and configured as per the instructions. However the StaticFileHandler doesn't seem to be firing at all. I just get a 404 error for any files in the /Media folder.
I'm running locally using VS 2015 and IISExpress.
Is there anything else that has to be configured?
edit: I've also tried using full IIS 8 locally
Elijah,
Awesome project. I am using it currently in 2 deployments and it's great - big thank you. Something that has been nagging me though is that the Media image source is centralized to S3, yet the cached files produced by imageprocessor still remain on the individual web servers which (in my mind) defeats the purpose of centralizing assets.
This led me to some investigation and I stumbed on the project ImageProcessor.Web.Plugins.AmazonS3Cache by James Jackson-South. The documentation is pretty scant (none) and there's a lot of guesswork in setting up the imageprocessor/cache.config. But I have it up and running and now both media and cache are served of s3. I have yet to performance test this, but it looks promising.
Since imageprocessor is integrated into the Umbraco core, maybe you can mention in the documentation the existence of this project as it seems to be a compliment to the goals of this project.
Thank-you,
Jamie Attwood
It seems it's having issue on Umbraco 7.3.x? If the media file uploaded is NOT an image, it works fine however, when media file is an image, the provider was never hit?
Any idea?
I've tried install this package to Umbraco V9, but i's not work.
Would you create a new package for Umbraco v9?
Hey gang! Curious if this file provider supports CloudFront (CDN)? Basically, it should work like the following:
Does this work out of box? Any examples?
On one of our sites, we've come across an issue where if we're hosting mp4 files on S3, the file will load fine in Safari with the AWS URL, but not from the VPP we've set up.
After inspecting the response, AWS adds the following line to the header:
Accept-Ranges: bytes
It would seem that Safari has an issue where it looks to load the file in parts, and if it cannot, it won't bother to render the video at all. The video loads fine over the VPP in all other browsers, but Safari on the Mac.
The same issue has been raised for one of the other Umbraco providers that targets Azure, so I've improvised with the following code in FileSystemVirtualPathProviderFile.cs
to add the header to the response.
public override Stream Open()
{
if (HttpContext.Current != null)
{
var path = HttpContext
.Current
.Request
.FilePath;
if (path.Contains("mp4"))
{
HttpContext
.Current
.Response
.AppendHeader("Accept-Ranges", "bytes");
}
}
return _stream();
}
With this code in place, we've managed to get mp4's to render. If you're okay with me doing so, I'm happy to add this code in a pull request.
I am using latest 7.11 umbraco and configured S3 provider with all given steps. Images have been stored in S3 bucket successfully and show thumbnails in backoffice but its not rendering on page from CDN path its still shows local path i.e. " /media/1001/a.jpg" It should be "http://abc.com/media/1001/a.jpg".
If I use database option by making entry in hostname it works fine, but that is not the ideal solution.
kindly help
Hi I am attempting to allow seeking on my audio files using VPP and the S3 provider but we are receiving errors on the 206 request for partial content when scrubbing to a different audio position.
Any ideas on how we can resolve this issue?
Hello,
We are using the Umbraco 7.12.3 and try to load images from the S3 bucket.
Following the guide, we installed Umbraco.Storage.S3
(also tried ImageProcessor
) and made subsequent configuration changes.
Umbraco starts without errors.
However, when any site tries to load the media files from the S3 bucket it ends up with 404 Not Found
.
We try a private S3 bucket with specified AWSAccessKey
and AWSSecretKey
, as well as a public S3 bucket without the settings.
It seems it doesn't work even with the correct configuration.
Is there a way to check out the provider logs for further investigation?
Maybe, it is a known issue with the specific Umbraco version?
In back-office image is successfully uploaded and show thumbnail in back-office, but when I click on that thumbnail to see all cropped options it does not show all dimensions thumbnails. as shown below
As I see in src of these thumbnails we do not have any query string parameter, so Image processor is not hijacking these images and hence not rendering
Do we have any solution for that or is there any way in provider that we can upload image at both the place local media and as well as at S3 media folder.
Hi,
I'm wondering if the S3 Provider is known to work (anywhere) with Umbraco Courier? https://umbraco.com/products/umbraco-courier/
Regards,
Warren.
Firstly, great work on this! Question: I followed all setup instructions and its working fine and is uploading to S3 as expected. In the media folder on the media item (ImageCropper) once uploaded, if you click out and back in again no previews show on main image or any of the crops and no crops are created on S3. Is there a way to configure this for a seamless backend experience? How can I configure Umbraco to still be able use the backoffice media section to manage the uploads, crops and previews whilst the images and crops are stored in S3? Any ideas on this?
Interestingly you do get a preview if you click on the containing folder of the media item but not if you click into the item itself. My client needs to be able to upload and edit crops as before but it stores everything in S3 instead of in the local file system.
Hi,
I have followed all the instructions. The S3 provider works perfect with Virtual Path but I cannot make it work with ImageProcessor.
I added the following code to security.config:
<?xml version="1.0" encoding="utf-8"?> <security> <services> <service prefix="media/" name="CloudImageService" type="ImageProcessor.Web.Services.CloudImageService, ImageProcessor.Web"> <settings> <setting key="MaxBytes" value="8194304"/> <setting key="Timeout" value="30000"/> <setting key="Host" value="https://<my_bucket>.amazonaws.com/media/"/> </settings> </service> </services> </security>
The bucket is public so it should have permissions. The image is uploaded correctly but when I try to resize nothing happens.
Please, could anyone help with this?
Thank you in advance.
Kind Regards.
Can I know when is the v8 being supported by this package? I think READ.ME is outdated as when implementing changes to Global.asax.cs it breaks and FileSystemProvider no longer exists in v8.
Hi,
I've been using this for a while along side image processor and it has been working really well. I recently upgraded a site to Umbraco 7.5.3, and I now have an issue where NON image media throws a 404 (PDs, XLS, DOC etc.)
I am not sure what the issue is, whether it's Image Processor intercepting the request (assume it would only intercept image requests), or something new with Umbraco 7.5, but I am pulling my hair out. I had to set Image Processor to "InterceptAllRequests", otherwise images were not being rendered without querystring paramters (therefore not appearing properly in the Umbraco media section), turning this off makes no difference to the issue I am having with non image files.
I have followed the setup documented in the readme file, there is a new web config in the media folder for this version of Umbraco, and i've tried adding the StaticFileHandler into that, but no joy.
Help :-)
Not seeing any response an recent issues. Is this still active?
Not really an issue but more of a nice to have.
Would be nice to allow configuration of the ACL applied to newly added files. Currently it's hard-coded to public and when using virtual path providers it would be nice to have it set to private.
Hi,
I've had great success using Umbraco.Storage.S3
to offload Umbraco's media directory to Amazon's S3, but I'm wondering if it is possible to do the same for Umbraco Forms's data directory /App_Data/UmbracoForms/Data
?
Current set up in case it is useful...
I have an S3 bucket with the following structure:
I have added the following to ~/Config/FileSystemProviders.config
:
<Provider alias="forms" type="Umbraco.Storage.S3.BucketFileSystem, Umbraco.Storage.S3">
<Parameters>
<add key="bucketName" value="my-bucket-name.com" />
<add key="bucketHostName" value="" />
<add key="bucketKeyPrefix" value="Data" />
<add key="region" value="eu-west-2" />
</Parameters>
</Provider>
and added FileSystemVirtualPathProvider.Configure<FileSystemWrapper>("Data");
to an ApplicationStarting
method I have created in Global.asax.cs
.
Firstly thank you for making this plugin, it is very convenient to be able to save our media directly to an S3 bucket without much hassle at all!
I've noticed what is perhaps a bug whereby when you update the bucketKeyPrefix
setting inside ~/Config/FileSystemProviders.config
, Umbraco is unable to find the image for rendering inside the backoffice.
To replicate:
bucketKeyPrefix
to media_123
http://localhost:53714/media_123/1001/test.jpg
I have also tried calling FileSystemVirtualPathProvider.ConfigureMedia("media_123");
inside Global.asax.cs
to no avail. Is this a problem with the VirtualPathProvider
or is there just some configuration that I have overlooked when updating this setting?
Hi!
Beautiful package, thank you!
I was trying to resize the image using the documentation in this post
(at the end, "Pre Processing")
https://24days.in/umbraco-cms/2014/all-your-images-are-belong-to-umbraco/
using the
MediaService.Saving += (sender, args) =>{
/*edit the image and save using ImageFactory.Save()*/
}
but it gives me an error
An exception of type 'System.ArgumentException' occurred in mscorlib.dll but was not handled in user code
Additional information: URI formats are not supported.
when the code saves the image.
Could you give me a suggestion to perform a resize (I want the images to be uploaded with a max resolution of 1500px) before the image is saved to the S3 Bucket?
Thank you very much
S
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.