Open dhensby opened 10 years ago
Ooh, you make a good point about $_URL_TO_FILE_MAPPING
. How do I go about using it? Let me know and I'll push it in ASAP.
The CLI pulls it in automatically and uses it to fill the $_SERVER
superglobal
This isn't CLI based!
You could look at static publisher's approach?
I've searched through that repository for $_FILE_TO_URL_MAPPING
but there's nothing there.
Moreover, the static publisher doesn't need to pull in assets - that's done on the client side - whereas in this instance, the binary needs to request those images itself and embed them directly in to the PDF, before the client views it. Does that make sense?
For now, http://localhost looks like a sensible default to me. If it needs to be changed it'll be because of multi instance live deployment. That's why I'm not using the base URL and calling it something else.
I meant how the publisher use custom domain names.
Ok, lets put it on the back-burner for now
Why are we introducing another way to manage the base URL for the PDF when we can just use core to do so?
Be it
alternate_base_url
or$_URL_TO_FILE_MAPPING
?https://github.com/BetterBrief/silverstripe-pdf/commit/17de2b4be32080e151dddba006d3ed533aecb9cb#diff-608f3da92c5983277ec89535c449a0eeR19