upload_file Method
Uploads a file.
Syntax
def upload_file(new_file_path: str) -> str: ...
Remarks
This method uploads a new file to NewFilePath and returns the full path of the uploaded file. If a file already exists on the server at NewFilePath, the overwrite property controls whether the server will overwrite the file or return an error.
If the CreatePermission configuration setting is non-empty, the file will be created with the permission it specifies. Otherwise, the server's default (755) will be used.
If local_file is set the file will be uploaded from the specified path. If local_file is not set the data in resource_data will be used.
To encrypt the file before uploading it, set encryption_algorithm and encryption_password.
hdfs.LocalFile = "../MyFile.zip"; hdfs.UploadFile("/MyFile.zip");