Skip to main content
upload_files_fromurl(file_names=None, urls=None, options=)[source]

Uploads one or more files to KiFS.

Each file path must reside in a top-level KiFS directory, i.e. one of the directories listed in GPUdb.show_directories(). The user must have write permission on the directory. Nested directories are permitted in file name paths. Directories are delineated with the directory separator of ‘/’. For example, given the file path ‘/a/b/c/d.txt’, ‘a’ must be a KiFS directory.

These characters are allowed in file name paths: letters, numbers, spaces, the path delimiter of ‘/’, and the characters: ‘.’ ‘-’ ‘:’ ‘[’ ‘]’ ‘(’ ‘)’ ‘#’ ‘=’.

Parameters

file_names (list of str) –

An array of full file name paths to be used for the files uploaded to KiFS. File names may have any number of nested directories in their paths, but the top-level directory must be an existing KiFS directory. Each file must reside in or under a top-level directory. A full file name path cannot be larger than 1024 characters. The user can provide a single element (which will be automatically promoted to a list internally) or a list.

urls (list of str) –

List of URLs to upload, for each respective file in input parameter file_names. The user can provide a single element (which will be automatically promoted to a list internally) or a list.

options (dict of str to str) –

Optional parameters. The default value is an empty dict ( ).

Returns

A dict with the following entries–

successful_file_names (list of str) –

List of input parameter file_names that were successfully uploaded.

successful_urls (list of str) –

List of input parameter urls that were successfully uploaded.

info (dict of str to str) –

Additional information.