Fix upload related file. Closes #888.