Closed cookiejest closed 7 years ago
Hey @cookiejest, sorry to hear you're having trouble!
As you said - it works when using local storage, so this is likely not a problem with Ghost itself. As such, it is most likely a problem with the ghost-s3-storage-adapter
here: https://github.com/aorcsik/ghost-s3-storage-adapter. I'd suggest opening up an issue there 😄
If it turns out that this is an issue with Ghost itself, then this issue can be reopened. Thanks!
ok, to help me figure this out, does ghost preappend the '2017/02' or is it that module?
Because if it is ghost there should be some option to change the format
becuase it seems to be that ghost passes the image name
@cookiejest Ghost does pass the image name (with the date prepended) - because by default it stores it locally in the filesystem (which needs the right slashes prepended).
Ghost has a way to override the directory that is passed though: see here. If the ghost-s3-storage-adapter
overrides that function, then it can better normalize the slashes.
Issue Summary
Image URLs do not work when hosted on windows.
Steps to Reproduce
I am doing file upload to s3 using 'ghost-s3-storage-adapter'.
The s3 image is stored with a date and at the start like so:
'2017/02/originalimagename.png'
It seems to be adding the date before the image name. This works when using local storage. However when uploading to S3 the image reference is then incorrect. The image reference would be like so:
[https://s3-eu-west-1.amazonaws.com/[SOMES3BUCKET]/2017\02\Coriginalimagename.png]
This is not valid and so the image does not display. The correct URL for something like this would be:
[https://s3-eu-west-1.amazonaws.com/[SOMES3BUCKET]/2017%5C02%5Coriginalimagename.png]
However idealy should not be putting \ into image names. It would be better to use '-'
Any ideas how I could do that? Thanks,
Technical details: