change file path to url before sent to client