/** * * @param TemporaryFile $file * @return FileInfoRepresentation */ private function buildFileRepresentation(TemporaryFile $file) { $reference = new FileInfoRepresentation(); return $reference->build($file->getId(), $file->getCreatorId(), $file->getDescription(), $file->getName(), $file->getSize(), $file->getType(), null, null); }
public function buildFileInfoData(Tracker_Artifact_Attachment_TemporaryFile $file, $path) { return array('id' => $file->getTemporaryName(), 'submitted_by' => $file->getCreatorId(), 'description' => $file->getDescription(), 'name' => $file->getName(), 'tmp_name' => $path, 'size' => $file->getSize(), 'type' => $file->getType(), 'error' => UPLOAD_ERR_OK, 'action' => ''); }