Update upload functionality

Signed-off-by: Maxim Osipov <maxim.osipov@gmail.com>
Change to BSD 3-Clause license

Signed-off-by: Maxim Osipov <maxim.osipov@gmail.com>