ifvictr / ghost-storage-github

:octocat: GitHub storage adapter for Ghost
https://npm.im/ghost-storage-github
MIT License
65 stars 12 forks source link

Fixes saved URLs when destination is not equal to '/' #26

Closed ScottSmith95 closed 5 years ago

ScottSmith95 commented 5 years ago

Previously, when directory was set to anything other than /, say, directory = example/, GitHub's API returns the filename and path. Instead of duplicating the path, we need a function that returns the path and filename received from GitHub and concatenates it with the baseUrl to prevent the previous behaviour of saving a string like https://raw.githubusercontent.com[…]example/example/file.jpg.

ifvictr commented 5 years ago

Finally had time to get around to this—thanks! :)

ScottSmith95 commented 5 years ago

Thank you for taking the time!