allowing upload as url or as filepath