Score:0

Retain sites//files path for cdn urls

ph flag

I just updated the cdn module and seems the CDN urls formed for pdf (and other) attachments have been updated with the /public/ keyword.

Before:

https://cdn-domain/de/cdn/farfuture/<token_string>/sites/de/files/2022-05/file_name.pdf

where de is a multisite alias.

After the module upgrade the new path is rendered as

https://cdn-domain/de/cdn/ff/<token_string>/public/2022-05/file_name.pdf

Is there any way to retain the previous urls? i.e, when a new attachment is loaded, the url formed for the media file should be in the form of .../sites/de/files/... (which was before the module upgrade).

I think this is where all changed in the cdn module - https://www.drupal.org/node/3051642

id flag
That change occurred three years ago. Which versions did you upgrade from and to, precisely?
jitendrapurohit avatar
ph flag
Updated from 8.x-3.2 to 8.x-3.5.
jitendrapurohit avatar
ph flag
Just trying to find if there's a way (advanced mapping?) to use the old style path. If not - I think i'll need to proceed in fixing other parts (custom code) of the site that depended on `sites/<site>/files` format :(.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.