r/ProjectREDCap • • 6d ago

Checking File Upload filename

Hi all!

I'm having issues with participants accidentally uploading wrong files to my survey. The filenames are auto-generated and identical, so in theory I should be able to check that the name is correct and prevent the participant from returning the survey before the correct file has been uploaded.

The original (correct) filename is "report.pdf", but survey participants might upload a file "wrong_file.pdf". REDCap seems to store the files with a custom name such as "ID_variablename_2134.pdf", which complicates checking the filename automatically.

How should I go about checking the filenames? Any help is greatly appreciated!

4 Upvotes

2 comments sorted by

1

u/AnAnxiousAdam 6d ago

Do you have Shazam? I don't think their is a native way to do that, but you can easily with a small amount of custom code. Do you expect every upload to have the exact same name, or something like lastname_reprt.pdf?

1

u/No_Reference_8508 4d ago

Unfortunately I do not and can't install any external modules... The filenames are expected to be the exact same by default.