Accepts a file submission from a browser as a build parameter. The uploaded file will be placed at the specified location in the workspace, which your build can then access and use.

This is useful for many situations, such as:

  1. Letting people run tests on the artifacts they built.
  2. Automating the upload/release/deployment process by allowing the user to place the file.
  3. Perform data processing by uploading a dataset.

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.)