Downloading and uploading a file in form

I need to create a task in a workflow where a user can download a file that was uploaded in a previous task and possibly upload an updated version of the file with the same field name. If I add the same field in the form as a download and an upload it form gives an error that the field already exists. Doing two tasks (one for the download and one to upload the update) isn’t an option.

Any suggestions on how to implement this?

Are you using rest api or java api to handle file upload and download?

Neither. They are form elements in a cam-form.

this thread might be related: Use the same name in cam-variable-name

Thanks for the suggestion but that doesn’t work. You can’t add the same variable name twice in a form. It gives an error stating that the variable name has already been added. Thus the reason for asking this question.