This step allows you to upload a file to a file input element on the page. You must execute this step before interacting with the file input element.

Inputs

file url
string
required

Reference to the file to upload, in one of the following formats:

  • Publicly accessible remote files can be referenced using URLs starting with http:// or https://.
  • Files downloaded in previous steps can be referenced using the special file:// prefix.
  • CLI-only: local files can be referenced by path. The path must be absolute or relative the the root momentic.config.yaml file.

Files are limited to 50MB in size.

filename
string

Optional name and extension for the uploaded file. If not provided, the filename will be extracted from the file URL. Including a file extension is recommended to ensure your application receives the correct MIME type.

Limitations

For security reasons, certain file extensions are not allowed:

  • Executable files: .exe, .app, .bat, .cmd, .msi
  • Scripts: .sh, .py, .js, .php, .asp
  • Mobile apps: .apk
  • Java archives: .jar

Was this page helpful?