Upload a file through the use of multipart form post.
Arguments
- path
The path of the new file. The path should be the absolute DBFS path (for example
/mnt/my-file.txt
).- file
Path to a file on local system, takes precedent over
path
.- contents
String that is base64 encoded.
- overwrite
Flag (Default:
FALSE
) that specifies whether to overwrite existing files.- host
Databricks workspace URL, defaults to calling
db_host()
.- token
Databricks workspace token, defaults to calling
db_token()
.- perform_request
If
TRUE
(default) the request is performed, ifFALSE
the httr2 request is returned without being performed.
Details
Either contents
or file
must be specified. file
takes precedent over
contents
if both are specified.
Mainly used for streaming uploads, but can also be used as a convenient single call for data upload.
The amount of data that can be passed using the contents parameter is limited
to 1 MB if specified as a string (MAX_BLOCK_SIZE_EXCEEDED
is thrown if
exceeded) and 2 GB as a file.
See also
Other DBFS API:
db_dbfs_add_block()
,
db_dbfs_close()
,
db_dbfs_create()
,
db_dbfs_delete()
,
db_dbfs_get_status()
,
db_dbfs_list()
,
db_dbfs_mkdirs()
,
db_dbfs_move()
,
db_dbfs_read()