Fixing download script and display result in view