Closed kaspiana closed 2 months ago
This information may be stored in the database. This would allow for such information to be queried without needing to open document files.
Since documents are identified by their hash, it should not be possible for a document file to change, and so this does not introduce data redundancy.
For each relevant MIME type, a table could be created, linked to the document
table with a foreign key.
Example:
document_id | width | height | bit_depth |
---|---|---|---|
1 | 800 | 600 | 24 |
2 | 400 | 400 | 24 |
... | ... | ... | ... |
document_id | width | height | bit_depth | length |
---|---|---|---|---|
24 | 1920 | 1080 | 24 | 120000 |
... | ... | ... | ... | ... |
As no assumptions are made about what kind of documents will be stored in an archive, common information such as image dimensions is not currently shown.
Mage should detect the type of a file, i.e. the MIME type, and determine such information when using
mage doc [doc]
.Example: