properly build canvadoc/crocodoc urls in attachment helper
properly build canvadoc/crocodoc urls in attachment helper

fixes CNVS-15230

Test plan:
  1. upload a file to a course
  2. add the file as a module item in the course
  3. clicking on the module item should show the document preview

Change-Id: If7ba18fa3a08302ef3f84d300f08cbb5511a2dc5
Reviewed-on: https://gerrit.instructure.com/40536
Reviewed-by: Simon Williams <088e16a1019277b15d58faf0541e11910eb756f6@instructure.com>
Tested-by: Jenkins <d95b56ce41a2e1ac4cecdd398defd7414407cc08@instructure.com>
QA-Review: Amber Taniuchi <ef4bfd1e6d278f6bc7d4a478f02be2cb9581a0a5@instructure.com>
Product-Review: Cameron Matheson <1d572acbfa68c7c6e541c7b840d6b622e5c0dc91@instructure.com>

sfu/canvas-lms,whalejasmine/canvas-lms,redconfetti/canvas-lms,shidao-fm/canvas-lms,djbender/canvas-lms,greyhwndz/canvas-lms,HotChalk/canvas-lms,sfu/canvas-lms,efrj/canvas-lms,sdeleon28/canvas-lms,redconfetti/canvas-lms,skmezanul/canvas-lms,Jyaasa/canvas-lms,SwinburneOnline/canvas-lms,ShreniiNepal/shrenii_lmp,Jyaasa/canvas-lms,tgroshon/canvas-lms,HotChalk/canvas-lms,djbender/canvas-lms,redconfetti/canvas-lms,sfu/canvas-lms,va7map/canvas-lms,fronteerio/canvas-lms,antoniuslin/canvas-lms,va7map/canvas-lms,ShreniiNepal/shrenii_lmp,va7map/canvas-lms,Jyaasa/canvas-lms,whalejasmine/canvas-lms,djbender/canvas-lms,wye0220/shindig-canvas,kyroskoh/canvas-lms,leftplusrightllc/canvas-lms,efrj/canvas-lms,tgroshon/canvas-lms,ShreniiNepal/shrenii_lmp,greyhwndz/canvas-lms,fronteerio/canvas-lms,roxolan/canvas-lms,whalejasmine/canvas-lms,samuels410/greatlakes-lms,sfu/canvas-lms,roxolan/canvas-lms,efrj/canvas-lms,wrdsb/canvas-lms,wye0220/shindig-canvas,va7map/canvas-lms,SwinburneOnline/canvas-lms,tgroshon/canvas-lms,HotChalk/canvas-lms,ShreniiNepal/shrenii_lmp,wye0220/shindig-canvas,antoniuslin/canvas-lms,shidao-fm/canvas-lms,utkarshx/canvas-lms,kyroskoh/canvas-lms,grahamb/canvas-lms,sfu/canvas-lms,venturehive/canvas-lms,grahamb/canvas-lms,utkarshx/canvas-lms,grahamb/canvas-lms,skmezanul/canvas-lms,sfu/canvas-lms,juoni/canvas-lms,grahamb/canvas-lms,grahamb/canvas-lms,Jyaasa/canvas-lms,skmezanul/canvas-lms,greyhwndz/canvas-lms,efrj/canvas-lms,shidao-fm/canvas-lms,shidao-fm/canvas-lms,greyhwndz/canvas-lms,kyroskoh/canvas-lms,fronteerio/canvas-lms,roxolan/canvas-lms,venturehive/canvas-lms,roxolan/canvas-lms,redconfetti/canvas-lms,venturehive/canvas-lms,jay3126/canvas-lms,leftplusrightllc/canvas-lms,SwinburneOnline/canvas-lms,SwinburneOnline/canvas-lms,antoniuslin/canvas-lms,Rvor/canvas-lms,jay3126/canvas-lms,skmezanul/canvas-lms,kyroskoh/canvas-lms,juoni/canvas-lms,djbender/canvas-lms,samuels410/greatlakes-lms,antoniuslin/canvas-lms,samuels410/greatlakes-lms,jay3126/canvas-lms,wrdsb/canvas-lms,tgroshon/canvas-lms,sdeleon28/canvas-lms,Rvor/canvas-lms,leftplusrightllc/canvas-lms,utkarshx/canvas-lms,sdeleon28/canvas-lms,Rvor/canvas-lms,utkarshx/canvas-lms,fronteerio/canvas-lms,sdeleon28/canvas-lms,whalejasmine/canvas-lms,samuels410/greatlakes-lms,juoni/canvas-lms,HotChalk/canvas-lms,sfu/canvas-lms,wrdsb/canvas-lms,leftplusrightllc/canvas-lms,juoni/canvas-lms,Rvor/canvas-lms,wrdsb/canvas-lms,venturehive/canvas-lms,jay3126/canvas-lms