ElijahGlover / Umbraco-S3-Provider

Amazon Web Services S3 IFileSystem provider for Umbraco
46 stars 34 forks source link

Question: resize image on upload #33

Open stefanoberetta opened 5 years ago

stefanoberetta commented 5 years ago

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