experimental version to try to get gui to upload function