[MGNLDAM-409] Links - DamDownloadServlet, Imaging Created: 03/Mar/14  Updated: 09/Apr/14  Resolved: 28/Mar/14

Status: Closed
Project: Magnolia DAM Module
Component/s: DAM Core
Affects Version/s: 2.0
Fix Version/s: 2.0

Type: Task Priority: Neutral
Reporter: Magnolia International Assignee: Daniel Lipp
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Relates
relates to MAGNOLIA-5708 A way for Servlet to "self map" - so ... Closed
dependency
depends upon MGNLDAM-410 Investigate link resolution Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Epic Link: DAM / CMIS
Sprint: 5.3 Sprint 3, 5.3 Sprint 4, 5.3 Sprint 5

 Description   

In the previous spike, I did a bunch of hacks to get the system working. Need to analyze:

  • usage of DamDownloadServlet. It's currently quite "complex" - we should simplify
  • Make sure we support /dam/ and /dam-static/: map all "static" to jcr:<uuid> to be backwards compatible (even for DMS)
  • Finally, Asset.getURL() needs to be correctly implemented, and how will probably highly depend on the above and MGNLDAM-410


 Comments   
Comment by Magnolia International [ 13/Mar/14 ]

For now, here's my line of thought:

  • DamDownloadServlet should implement SelfMappingServlet (see MAGNOLIA-5708)
  • It should still support dam-static, but maybe just check for the word "static" in the servletPath
  • Use request.getServletPath() to know what to do (rather than try to "smartly" parse AggregationState.currentURI - the container did that for you !), i.e "normal" request or -static.
  • Use request.getPathInfo() to know what asset to load (same reasons)
  • @Inject rather than use Components
  • Existing URLs should still be supported (i.e those that may or may not have had a complete asset key (prov:id) from previous versions
  • TBD: should URLs be /<servlet-mapping>/<asset-key>/<filename>, or omit the filename ?
  • TBD: if we use filename in URLs, should it be mandatory, validated ? (is it a potential security issue, or should we just ignore anything after <asset-key> ?
  • TBD: if we use filename in URLs, clarify what the AssetUtil.replaceSpecialCharacters and AssetUtil.getEncodedFileName were doing, if/how that's necessary, and relocate/rewrite those in an appropriate place.
Generated at Mon Feb 12 04:59:33 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.