[MGNLRES-105] Resource can't have same name different extension Created: 14/Aug/13 Updated: 29/Mar/22 Resolved: 04/Dec/13 |
|
| Status: | Closed |
| Project: | Magnolia Resources Module |
| Component/s: | None |
| Affects Version/s: | 1.5, 2.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Ricardo Ulate | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Tested on Windows 7, Running on Eclipse |
||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Bug DoR: |
[ ]*
Steps to reproduce, expected, and actual results filled
[ ]*
Affected version filled
|
||||||||
| Date of First Response: | |||||||||
| Team: | |||||||||
| Description |
|
One can't have several files with the same name but different extension. This is common when for font files with extensions: ttf, woff, svg, eot The work around is to change the filename. |
| Comments |
| Comment by Tobias Mattsson [ 04/Dec/13 ] |
|
This is by design. The extension is not part of the node name. The design allows for serving a resource in any number of supported formats by transforming it on the fly. |
| Comment by Ricardo Ulate [ 09/Dec/13 ] |
|
"The design allows for serving a resource in any number of supported formats by transforming it on the fly." Does this also apply to font files?, because as mentioned on the ticket, the problem we're having is related with handling several font files (to better support different browsers), where it makes sense they are named the same just with a different extension. |
| Comment by Magnolia International [ 06/Mar/14 ] |
|
Hi, I suggest the following approach instead: Usage of a dedicated Resources renderer which returns the binary corresponding to the requested extensions. Basically the idea is to have a node called for instance myImage. It has its own type called extension dispatcher. Below this node, there are several nodes, one for each extension: myImage [Extension Dispatcher] |-- jpg [Binary/jpg] |-- png [Binary/png] The renderer will look at the extension (on the URI) and returns the corresponding sub node. I have attached the patch to the issue. |
| Comment by Roman Kovařík [ 06/Mar/14 ] |
|
Hi Nicolas, Regards |
| Comment by Roman Kovařík [ 17/Mar/14 ] |
|
Hello Nicolas,
Hope that helps. |