Update function: upload. Now files add to local directory