Skip to content

Commit

Permalink
docs: add documentation of new parameter option shouldRenameFileOnUpload
Browse files Browse the repository at this point in the history
  • Loading branch information
csm-thu committed Oct 2, 2023
1 parent 29822bf commit 4d16789
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion doc/scenarioParametersConfiguration.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,14 @@ information about it in the `options` field of the parameter description:
- `connectorId`: the connector id to use in the dataset object that will be created with the Cosmo Tech API
- `description`: the description to use in the dataset object that will be created with the Cosmo Tech API

Also, if you want to have a default file present when creating a new scenario, you can provide the id of an existing
When files uploaded by webapp users are sent to the back-end to be stored (for example in Azure Storage), the original
file name is preserved. This behavior can be inconvenient when writing the parameters handler of your solution. If you
want to have more predictable names for the files uploaded with the webapp, you can enable the option
`options.shouldRenameFileOnUpload` to force the renaming of files uploaded by users before they are sent to the
back-end. When this option is enabled, a new file name is generated by concatenating the parameter id with the extension
of the uploaded file (e.g._initial_stock_dataset.csv_)

Finally, if you want to have a default file present when creating a new scenario, you can provide the id of an existing
dataset in the `defaultValue` property.

Example:
Expand All @@ -140,6 +147,7 @@ parameters:
connectorId: 'c-d7e5p9o0kjn9'
description: 'Initial stock dataset part'
defaultFileTypeFilter: '.zip,.csv,.json,.xls,.xlsx'
shouldRenameFileOnUpload: true
```

### Table parameters
Expand Down

0 comments on commit 4d16789

Please sign in to comment.