Added filename into upload function