Custom Upload Validation¶
Tip
For information on creating and managing upload types themselves, see Configuring Upload Types.
The validation_overrides.py file in the upload Django app is a user-editable
script for custom validation of user uploads on the VOR Stream web UI. This
file is persisted after a deployment under specific conditions, which are
managed using a checksum.txt file.
Deployment Scenarios¶
This section outlines various deployment scenarios and the
corresponding handling of the validation_overrides.py file.
Case 1: Deployment on a Fresh Server¶
validation_overrides.pyis created.checksum.txtis created.
Case 2: Deployment on an Existing Server Without an Overrides File¶
validation_overrides.pyis created.checksum.txtis created.
Case 3: Deployment on an Existing Server With an Overrides File¶
- If
validation_overrides.pyhas not been modified, it will remain unchanged. - If
validation_overrides.pyhas been modified, it will be persisted. checksum.txtremains the same, regardless of whethervalidation_overrides.pyhas been modified or not.
Case 3: Deployment on an Existing Server with an Outdated Overrides File¶
In the case where the validation_overrides.py file in deployment package
is updated,
validation_overrides.pywill be backed up asvalidation_overrides.py.bakand replaced after deployment, regardless of whether it has been modified or not.checksum.txtwill be updated with the checksum of the newvalidation_overrides.py.
Case 4: Deployment on an Existing Server with an Overrides File but Missing checksum.txt¶
In the case where checksum.txt is accidentally deleted,
validation_overrides.pywill be backed up asvalidation_overrides.py.bakand replaced after deployment, regardless of whether it has been modified or not.- A new
checksum.txtis created.
Important
Administrator Responsibility: Administrators must be aware of changes
to validation_overrides.py and notify users prior to deployment.
This ensures users know where to find the backup file
(validation_overrides.py.bak) and can modify the updated
validation_overrides.py after a successful deployment.