0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00
ghost/ghost
Simon Backx f8e77ad012 🐛 Fixed uploading images with custom storage adapters
fixes https://github.com/TryGhost/Ghost/issues/16278

`urlToPath` is not a method that is defined on the StorageBase, and thus is not implemented on any custom storage adapter.

We need this method to prevent uploading a file in two different directories. Currently this is an edge case:
- If you upload a file at midnight between a month shift, it is possible that we upload one file at `/2023/02/file.png` and the original at `/2023/03/file_o.png`
- To make sure we upload the second at the same directory, we need the `urlToPath` implementation. The save method sadly only returns the URL, which could be different than the stored file path, so we cannot use that return value.

This fix only uses `urlToPath` if available, to prevent above issue.
2023-02-16 11:49:37 +01:00
..
adapter-cache-redis Fixed Redis cluster ttl configuration 2023-02-16 14:13:44 +08:00
adapter-manager
admin Added outbound link tagging for web posts (#16201) 2023-02-16 11:26:35 +01:00
api-framework
api-version-compatibility-service
audience-feedback
bootstrap-socket
constants
core 🐛 Fixed uploading images with custom storage adapters 2023-02-16 11:49:37 +01:00
custom-theme-settings-service
data-generator Updated avatar styles for webmentions 2023-02-13 13:16:24 +00:00
domain-events
dynamic-routing-events
email-analytics-provider-mailgun
email-analytics-service 🐛 Fixed storing email failures with an empty message (#16260) 2023-02-13 15:25:36 +01:00
email-content-generator
email-events
email-service Added outbound link tagging for web posts (#16201) 2023-02-16 11:26:35 +01:00
email-suppression-list
express-dynamic-redirects
extract-api-key
html-to-plaintext
i18n
importer-revue
job-manager
link-redirects
link-replacer Added outbound link tagging for web posts (#16201) 2023-02-16 11:26:35 +01:00
link-tracking
magic-link
mailgun-client
member-attribution Added outbound link tagging for web posts (#16201) 2023-02-16 11:26:35 +01:00
member-events 🐛 Fixed subscriptions visible as "Active" within Ghost Admin (#16255) 2023-02-13 13:07:53 +01:00
members-api 🐛 Fixed subscriptions visible as "Active" within Ghost Admin (#16255) 2023-02-13 13:07:53 +01:00
members-csv
members-events-service
members-importer
members-ssr
milestones Updated Milstone test to expect no event for existing milestone 2023-02-15 14:28:57 +02:00
minifier
mw-api-version-mismatch
mw-cache-control
mw-error-handler
mw-session-from-token
mw-update-user-last-seen
mw-vhost
oembed-service Update metascraper to v5.33.8 2023-02-10 02:02:53 +00:00
offers
package-json
payments
portal Improved micro copy on Portal email tips 2023-02-15 12:30:03 -04:00
referrers
security
session-service
settings-path-manager
staff-service 🐛 Fixed subscriptions visible as "Active" within Ghost Admin (#16255) 2023-02-13 13:07:53 +01:00
stats-service
stripe
tags-public Added async cache support to Tags repository 2023-02-13 19:01:43 +08:00
tiers
update-check-service
verification-trigger
version-notifications-data-service
webmentions Fixed Mention unit test 2023-02-16 14:37:22 +07:00