ezpublish:
default:
io:
url_prefix: "$var_dir$/$storage_dir$"
# S3 binary data handler storing to $var_dir$ folder
# url_prefix: "http://s3-eu-west-1.amazonaws.com/my.bucket/$var_dir$"
# nginx pointed directly to ezpublish-legacy/var/ezdemo_site/storage
# url_prefix: "http://static.site.com"
Problem: the uri sent by the SPI might be completely different (http://s3-eu-...) from what legacy expects (var/site/storage/...) when storing images .
An UrlDecorator is used to transform back & forth between two UrlDecorator.
One redecorator is added to the legacy image converter, with the source url decorator set to the "real" one, and the target to a legacy_url_decorator
with $var_dir$/$storage_dir$
as the prefix.
The redecorator is used to convert uris between the two schemes depending on the expectations.
Must be changed to also accept 'http' links (simple parse_url + scheme detection). The initial '/' should only be added if the prefix doesn't have a scheme.