cloud-pipeline
cloud-pipeline copied to clipboard
Launch form: allow uploading local files as path parameters
Background
At the moment, there are 4 types of path parameters available for run: Input, Common, Path and Output; user can specify file/folder paths manually or select them from storage browser dialog. It would be useful to add an ability to upload local files for Input, Common and Path parameter types.
Approach
ui.launch.parameters preference should be added to configure "local files upload" feature. If enabled, uploaded files should be stored in predefined storage and corresponding paths should be saved to the parameter value.
ui.launch.parameters preference
ui.launch.parameters describes the "Parameters" section behavior of the launch form.
- type: OBJECT
- default value: not set
- group: User Interface
- visible: true
{
"local_files": "...",
"upload_parameters": "true/false"
}
local_files definition
If specified (and not false), defines the rules for user-uploaded files.
Possible values: true / false / object:
upload_storage(string / number, optional, default value:{default_user_storage}): a storage to upload files; possible values - storage id (number/string), storage name (string),{default_user_storage}placeholderupload_storage_path(string, optional, default value:upload/{user.userName}/{date}) - a path to upload files; see available placeholders below.
Each file will be uploaded to the {upload_storage_path} folder under <file_name>.<guid>.<file_extension> file name.
Supported placeholders for upload_storage_path parameter:
{user}/${userName}/${user.userName}- a user name{date}- current date (YYYY-MM-DD)
upload_paramerters definition
Specifies, if Upload parameters feature is enabled (#3994).
Possible values: true / false, default value - false (disabled).