Created By  inflectra.jimx Friday, May 5, 2017

We often get questions about how the attachments in SpiraTeam are stored, and what the relationship is between the X.dat files on the file system and the original filenames. This articles provides information on this.

Attachments in the SpiraTeam Database

When you upload a new attachment into SpiraTeam, it creates two entries in the database, TST_ATTACHMENT and TST_ATTACHMENT_VERSION. We will examine each of these in turn.

TST_ATTACHMENT

This table contains a row for each attachment, including the filename and mime type:

If you decide to upload a new version of the same attachment, the version number gets updated, but the primary key (ATTACHMENT_ID) does not change. The FILENAME field contains the actual filename of the attachment and the extension will be correct filetype (e.g. .pdf, .xlsx, etc.)

 

TST_ATTACHMENT_VERSION

This table contains a row for each version of each attachment:

If you upload a new version of an existing document, the new row will have the same ATTACHMENT_ID (linked back to the TST_ATTACHMENT table), but a new ATTACHMENT_VERSION_ID.

Attachments in the Web Server Repository

On the web server running SpiraTeam, you will see a set of .dat files on the file system:

These files correspond to the ATTACHMENT_VERSION_ID (in very early versions of SpiraTeam it used to be the ATTACHMENT_ID). So if you know the ATTACHMENT_VERSION_ID then you simply need that ID's file:

<ATTACHMENT_ID>.dat

 

Attachments

Selected files will be attached to any email sent on saving ticket.

file selected files selected  () Delete Selected

  • Created:
  • by:

Select files to upload

Or drag and drop files here

Uploading …
Done!
Upload More?
There was an error.
Try again?

Save to upload the selected file(s)

Article Info
  • Last Updated: 5/5/2017
  • Article ID: KB251
  • Views: 667