https://github.com/lsgs/redcap-rename-file-upload
REDCap external module for automatically renaming uploaded files according to a specified name pattern
https://github.com/lsgs/redcap-rename-file-upload
mcri murdoch-childrens redcap redcap-external-module redcap-repo
Last synced: 5 months ago
JSON representation
REDCap external module for automatically renaming uploaded files according to a specified name pattern
- Host: GitHub
- URL: https://github.com/lsgs/redcap-rename-file-upload
- Owner: lsgs
- License: gpl-3.0
- Created: 2023-07-20T05:01:15.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-12-15T10:26:25.000Z (6 months ago)
- Last Synced: 2025-12-17T20:44:55.711Z (6 months ago)
- Topics: mcri, murdoch-childrens, redcap, redcap-external-module, redcap-repo
- Language: PHP
- Homepage:
- Size: 28.3 KB
- Stars: 1
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
********************************************************************************
# REDCap External Module: Rename File Upload
Luke Stevens, Murdoch Children's Research Institute https://www.mcri.edu.au
[https://github.com/lsgs/redcap-rename-file-upload](https://github.com/lsgs/redcap-rename-file-upload)
********************************************************************************
## Summary
Tag file fields with the action tag `@RENAME-UPLOAD='name_pattern'` to specify how files uploaded to the field should be renamed.
Notes:
* The tag is ignored for fields other than file upload fields.
* Piping of field values and smart variables into the action tag *is* supported, and can utilise data entered onto the same form as the file upload field because the renaming occurs as the form is saved.
* Do not include any file extension within the pattern. Renamed files will keep the extension with which they were uploaded.
* Problematic characters ([https://en.wikipedia.org/wiki/Filename#Problematic_characters](https://en.wikipedia.org/wiki/Filename#Problematic_characters)) will be removed when renaming.
********************************************************************************
## Examples
* `@RENAME-UPLOAD='MyCustomFilenamePattern_rec-[record-name]'`
* `@RENAME-UPLOAD='MyCustomFilenamePattern_[project-id]-[record-name]-[filename_part]'`
* `@RENAME-UPLOAD='MyCustomFilenamePattern_[record-name]-[survey-time-completed]'`
********************************************************************************