Fixed a case where file would not open when sent from webapp.