...
Code Block |
---|
[ { "name": "allowed.upload.max.file.size", "value": "52428800" } ] |
Internal Storage for Attachments
Attachments are stored in the attachment folder under Zephyrdata folder. The path to Zephyrdata folder can be found in jdbc.properties file saved under property ZEPHYR_DATA.
The folder Zephyrdata is a shared directory in case of a cluster setup as the data contained in this folder should be accessible to all the cluster nodes.
Attachment file and folder structure logic
The attachments are saved using the following logic:
Code Block |
---|
attachment/<entityType>/seq-<sequenceId>/<entityId>/<attachmentId> |
The placeholders occupied are:
<entityType>: This is the type of entity against which the attachment is being saved.
For example, testcase, requirement, user, and so on.<sequenceId>: This ID consists of 4 digits. The format consists of:
<last four digits of entityId> + <padding count to 4 with 0>
.
For example,If the <entityId> is 1, then padding to make 4-digit count is 000, hence <sequenceId> is 1000.
If the <entityId> is 34, then padding to make 4-digit count is 00, hence<sequenceId> is 3400.
If the <entityId> is 12345, then padding to make 4-digit count is not required, hence <sequenceId> is 2345 as only the last 4 digits are taken.
<entityId>: This is the ID of the entity against which the attachment is being saved.
For example, testcaseId, requirementId, userId, and so on.<attachmentId>: This is the id given to every attachment as a unique identifier. This placeholder is the attachment file that was uploaded against the entity. The attachment is not saved with the original name in the directory but is saved with attachmentId.
The following are the examples:
For a testcase with id 1, attachments will be found in the following path:
Code Block |
---|
attachment/testcase/seq-1000/1/<attachmentFiles> |
For a testcase with id 34, attachments will be found in the following path:
Code Block |
---|
attachment/testcase/seq-3400/34/<attachmentFiles> |
For a testcase with id 12345, attachments will be found in the following path:
Code Block |
---|
attachment/testcase/seq-2345/12345/<attachmentFiles> |