This is useful for many situations, such as:
The name of the submitted file is available in the environment variable whose name is the same as file location. For example, if you set the file location to be abc.zip, then ${abc.zip} would give you the original file name passed from the browser (such as my.zip.) The name will not include the directory name portion.
File upload is optional. If a user chooses not to upload anything, Jenkins will simply skips this parameter and will not place anything (but it also will not delete anything that's already in the workspace.)
From the CLI, the -p
option to the build
command
should take an empty value to read from standard input.
(Only one file parameter can be defined this way.)