1
0
mirror of https://github.com/elisspace/autopsy.git synced 2026-09-06 02:24:30 +00:00

No longer store mime type in the gen info artifact

This commit is contained in:
Ann Priestman
2016-11-08 08:56:38 -05:00
parent 3df5c2330d
commit 5959ef0ed6
2 changed files with 0 additions and 36 deletions

View File

@@ -283,18 +283,6 @@ public class FileTypeDetector {
* Add the MIME type to the files table in the case database.
*/
Case.getCurrentCase().getSleuthkitCase().setFileMIMEType(file, mimeType);
/*
* Post to the blackboard, adding the file type attribute to the
* general info artifact. A property change is not fired for this
* posting because general info artifacts are different from other
* artifacts, e.g., they are not displayed in the results tree.
*/
BlackboardArtifact getInfoArt = file.getGenInfoArtifact();
@SuppressWarnings("deprecation")
BlackboardAttribute batt = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_FILE_TYPE_SIG, FileTypeIdModuleFactory.getModuleName(), mimeType);
getInfoArt.addAttribute(batt);
}
return mimeType;

View File

@@ -39,30 +39,6 @@ public class TikaFileTypeDetector {
private final int BUFFER_SIZE = 64 * 1024; //how many bytes to pass in
private final byte buffer[] = new byte[BUFFER_SIZE];
/**
* Detect the mime type of the passed in file and save it to the blackboard
*
* @param abstractFile
*
* @return mime type or null
*
* @throws TskCoreException
* @deprecated Use FileTypeDetector.detectAndPostToBlackboard(AbstractFile
* file) instead.
*/
@Deprecated
public synchronized String detectAndSave(AbstractFile abstractFile) throws TskCoreException {
String mimeType = detect(abstractFile);
if (mimeType != null) {
// add artifact
BlackboardArtifact getInfoArt = abstractFile.getGenInfoArtifact();
BlackboardAttribute batt = new BlackboardAttribute(BlackboardAttribute.ATTRIBUTE_TYPE.TSK_FILE_TYPE_SIG.getTypeID(), FileTypeIdModuleFactory.getModuleName(), mimeType);
getInfoArt.addAttribute(batt);
// we don't fire the event because we just updated TSK_GEN_INFO, which isn't displayed in the tree and is vague.
}
return mimeType;
}
/**
* Detect the mime type of the passed in file