Open ianleeder opened 1 year ago
I'm not sure why GetUrl
needs to worry about the bucket path. For now I've made a local build with the method looking like this:
public string GetUrl(string path)
{
return string.Concat(_rootUrl, "/", path);
}
And it seems to work, but there may be edge cases I'm not aware of.
I'm limited in my debugging capabilities, as I'm using a customer AWS account with SAML, so I've been unable to get this repo running locally to debug properly.
It appears that this project isn't observing the
UmbracoMediaPath
setting. In my project I have the setting"UmbracoMediaPath": "~/en-au/media"
, and that works fine on my local development. New media entries have a path set to/en-au/media/<random>/filename.ext
.However as soon as my code is deployed to AWS and uses this library, it can read and write to S3 just fine, but the paths are now
/media/<random>/filename.ext
.Initially I thought this line was the issue:
But it seems to be a red-herring. The actual problem is in the
GetUrl()
method. Somehow it needs to use_rootUrl
, but without debug capability I can't be confident enough to supply a PR.