def upload(self, build_dir):
        """

        :param build_dir: The directory to upload
        :param save_manifest: bool: To save manifest file
        :param purge: bool : To delete previously uploaded files
        :return:
        """
        files_list = []
        for root, dirs, files in os.walk(build_dir):
            for filename in files:
                local_path = os.path.join(root, filename)
                s3_path = os.path.relpath(local_path, build_dir)
                mimetype = utils.get_mimetype(local_path)

                kwargs = dict(aws_params=self.aws_params,
                              bucket_name=self.sitename,
                              local_path=local_path,
                              s3_path=s3_path,
                              mimetype=mimetype)

                files_list.append(s3_path)
                threading.Thread(target=self._upload_file, kwargs=kwargs)\
                    .start()

        # Save the files that have been uploaded
        self._set_manifest_data(files_list)
def upload ( self , build_dir ) : files_list = [ ] for root , dirs , files in os . walk ( build_dir ) : for filename in files : local_path = os . path . join ( root , filename ) s3_path = os . path . relpath ( local_path , build_dir ) mimetype = utils . get_mimetype ( local_path ) kwargs = dict ( aws_params = self . aws_params , bucket_name = self . sitename , local_path = local_path , s3_path = s3_path , mimetype = mimetype ) files_list . append ( s3_path ) threading . Thread ( target = self . _upload_file , kwargs = kwargs ) . start ( ) self . _set_manifest_data ( files_list )
:param build_dir: The directory to upload
        :param save_manifest: bool: To save manifest file
        :param purge: bool : To delete previously uploaded files
        :return: