Added more function to picture uploading