How to Bulk Import files(pdf, images) in Files field using CSV?
Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

How to Bulk Import files(pdf, images) in Files field using CSV?

Users usually capture participant consent and upload a scanned PDF copy in OpenSpecimen. Often, the consent forms of different participants are uploaded in bulk. OpenSpecimen allows users to upload documents for each participant using the Bulk Import (CSV) option.

To ensure security, OpenSpecimen will reject the ZIP file import if the following conditions are not met:

  • The Zip file should be less than 100 MB.

  • The file upload should complete within 60 seconds.

Video on Bulk Import Files

Use Case: Upload files for the ‘Consents’ document

  1. Navigate to Collection Protocols → Import → Biospecimen Data.

  2. Select the record type ‘Consents’ and download the template file.

  3. Fill up the CSV file with relevant consent data, refer to ‘Save/Update consents’.

    1. The ‘Consent Document Name’ column data should match the actual file that will be uploaded.

  1. Create a directory named ‘files’ containing actual consent files to be uploaded

Please ensure the folder name is in lowercase, specifically 'files'. Using names like 'Files', 'File', or 'file' will cause an import error.

  1. Create a zip file of the Consents CSV data file and the ‘files’ directory

  1. Upload this zip file in OpenSpecimen to bulk import

Refer to the sample file for the structure of the file attached below to be imported.

You can follow similar steps for other files like SPR, and custom form files, and form XML imports (with their dropdown CSV folder).

The Import location and templates vary based on what you are importing:

  1. SPR file upload: Use the ‘visits’ template

  2. Form data file upload: Use the corresponding custom forms template

  3. Form XMLs: Use the Form Import

Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com