What do the filenames mean in OJS. Some of it is obvious. For example, this file 304-1090-1-RV.docx - I believe the first number is the submission ID the RV must stand for Review File and I imagine the -1- is the first version. Where does the 1090 come from?
Are these filename conventions documented anywhere. I’d like to be able to explain this to editors.
Thanks in advance.
Hi @macdonaj ,
The best place to look at is the code:
}
}
/**
* PRIVATE routine to generate a filename for an article file. Sets the filename
* field in the articleFile to the generated value.
* @param $articleFile The article to generate a filename for
* @param $fileStage The type of the article (e.g. as supplied to handleUpload)
* @param $originalName The name of the original file
*/
function generateFilename(&$articleFile, $fileStage, $originalName) {
$extension = $this->parseFileExtension($originalName);
$newFileName = $articleFile->getArticleId().'-'.$articleFile->getFileId().'-'.$articleFile->getRevision().'-'.$this->fileStageToAbbrev($fileStage).'.'.$extension;
$articleFile->setFileName($newFileName);
return $newFileName;
}
/**
* PRIVATE routine to upload the file and add it to the database.
* @param $fileName string index into the $_FILES array
* @param $fileStage int identifying file stage (defined in ArticleFile)
Basically it’s a combination of:
1 - Article internal ID;
2 - Article file internal ID;
3 - Article file revision;
4 - The abbreviation of the article file stage;
5 - The original file extension;
Regards,
Bruno
2 Likes