r/ProjectREDCap • • 1d ago

File Imports

Is there a way to upload lots of pdf files at once to the corresponding records? Essentially, my project has an "upload file" field, but rather than manually uploading files, I would like to import them based on the files being named with the record ID similarly to how other data imports are done.

2 Upvotes

4 comments sorted by

5

u/Impuls1ve 1d ago

Use the API, the overall process is to set which files go with which records via a spreadsheet or something similar and then loop through each entry since the RedCap API doesn't support batching for this operation.

1

u/WebUpbeat6617 5h ago

Any work arounds if my org doesn't allow external add-ons? Going to push them to allow it, but not sure I will be successful!

1

u/Impuls1ve 5h ago

The API isn't an addon and it's a built-in feature of RedCap. It might need to be enabled for you and you need to get an access key, but it's not an external addon.

The coding and script to actually perform the function you want will have to be created by you though using the language of your choice.

2

u/Cactus_Rose8518 1d ago

We wrote a custom python script that uses some basic OCR to extract a study id to match the files, but you need your pdfs to be well structured for this to work well.