Support s3 and data:uri urls