- composer updates
- consistent repository identifier in OAI requests - open default formats in browser - open files in new tab
This commit is contained in:
parent
17fcdec50e
commit
8208558e8c
|
@ -20,7 +20,7 @@ class RequestController extends Controller
|
|||
* @var array
|
||||
*/
|
||||
private $deliveringDocumentStates = array('published', 'deleted'); // maybe deleted documents too
|
||||
private $xMetaDissRestriction = array('doctoralthesis', 'habilitation');
|
||||
//private $xMetaDissRestriction = array('doctoralthesis', 'habilitation');
|
||||
const SET_SPEC_PATTERN = '[A-Za-z0-9\-_\.!~\*\'\(\)]+';
|
||||
|
||||
/**
|
||||
|
@ -169,6 +169,8 @@ class RequestController extends Controller
|
|||
*/
|
||||
private function handleGetRecord(array &$oaiRequest)
|
||||
{
|
||||
$repIdentifier = "tethys.at";
|
||||
$this->proc->setParameter('', 'repIdentifier', $repIdentifier);
|
||||
// Identifier references metadata Urn, not plain Id!
|
||||
// Currently implemented as 'oai:foo.bar.de:{docId}' or 'urn:nbn...-123'
|
||||
$dataId = $this->getDocumentIdByIdentifier($oaiRequest['identifier']);
|
||||
|
@ -194,7 +196,8 @@ class RequestController extends Controller
|
|||
if (is_null($dataset)
|
||||
//or (false === in_array($dataset->getServerState(), $this->_deliveringDocumentStates))
|
||||
or (false === $dataset->whereIn('server_state', $this->deliveringDocumentStates))
|
||||
or (false === $dataset->hasEmbargoPassed())) {
|
||||
//or (false === $dataset->hasEmbargoPassed())
|
||||
) {
|
||||
throw new OaiModelException('Document is not available for OAI export!', OaiModelError::NORECORDSMATCH);
|
||||
}
|
||||
|
||||
|
@ -280,7 +283,7 @@ class RequestController extends Controller
|
|||
*/
|
||||
private function handleListSets()
|
||||
{
|
||||
$repIdentifier = "tethys.geologie.ac.at";
|
||||
$repIdentifier = "tethys.at";
|
||||
$this->proc->setParameter('', 'repIdentifier', $repIdentifier);
|
||||
$this->xml->appendChild($this->xml->createElement('Datasets'));
|
||||
|
||||
|
@ -329,7 +332,7 @@ class RequestController extends Controller
|
|||
$maxRecords = 100;
|
||||
}
|
||||
|
||||
$repIdentifier = "tethys.geologie.ac.at";
|
||||
$repIdentifier = "tethys.at";
|
||||
$tokenTempPath = storage_path('app/resumption'); //$this->_configuration->getResumptionTokenPath();
|
||||
|
||||
$this->proc->setParameter('', 'repIdentifier', $repIdentifier);
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
namespace App\Http\Controllers\Settings;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\View\View;
|
||||
use Illuminate\Http\Request;
|
||||
// use Illuminate\View\View;
|
||||
// use Illuminate\Http\Request;
|
||||
use App\Models\File;
|
||||
|
||||
class FileController extends Controller
|
||||
|
@ -14,7 +14,24 @@ class FileController extends Controller
|
|||
$file = File::findOrFail($id);
|
||||
$file_path = public_path('storage/' . $file->path_name);
|
||||
$ext = \Illuminate\Support\Facades\File::extension($file_path);
|
||||
return response()->download($file_path, $file->label . "." . $ext, ['Content-Type:' . $file->mime_type]);
|
||||
// return response()
|
||||
// ->download(
|
||||
// $file_path,
|
||||
// $file->label . "." . $ext,
|
||||
// ['Content-Type:' . $file->mime_type],
|
||||
// 'inline'
|
||||
// );
|
||||
|
||||
$pdf = $file->label . "." . $ext;
|
||||
$download_file = \Illuminate\Support\Facades\File::get($file_path);
|
||||
return response()->file($file_path, [
|
||||
'Cache-Control' => 'no-cache private',
|
||||
'Content-Description' => 'File Transfer',
|
||||
'Content-Type' => $file->mime_type,
|
||||
'Content-length' => strlen($download_file),
|
||||
'Content-Disposition' => 'inline; filename=' . $pdf,
|
||||
'Content-Transfer-Encoding' => 'binary'
|
||||
]);
|
||||
// return response()->download($file_path, $file->label, ['Content-Type:' . $file->mime_type]);
|
||||
}
|
||||
}
|
||||
|
|
66
composer.lock
generated
66
composer.lock
generated
|
@ -693,16 +693,16 @@
|
|||
},
|
||||
{
|
||||
"name": "laravel/framework",
|
||||
"version": "v5.8.37",
|
||||
"version": "v5.8.38",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laravel/framework.git",
|
||||
"reference": "ce08aaee3a0b8bb58b459b2decf7f25ba7b10fa4"
|
||||
"reference": "78eb4dabcc03e189620c16f436358d41d31ae11f"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/ce08aaee3a0b8bb58b459b2decf7f25ba7b10fa4",
|
||||
"reference": "ce08aaee3a0b8bb58b459b2decf7f25ba7b10fa4",
|
||||
"url": "https://api.github.com/repos/laravel/framework/zipball/78eb4dabcc03e189620c16f436358d41d31ae11f",
|
||||
"reference": "78eb4dabcc03e189620c16f436358d41d31ae11f",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -837,7 +837,7 @@
|
|||
"framework",
|
||||
"laravel"
|
||||
],
|
||||
"time": "2020-02-14T14:29:11+00:00"
|
||||
"time": "2020-04-14T14:14:36+00:00"
|
||||
},
|
||||
{
|
||||
"name": "laravel/tinker",
|
||||
|
@ -972,16 +972,16 @@
|
|||
},
|
||||
{
|
||||
"name": "league/flysystem",
|
||||
"version": "1.0.66",
|
||||
"version": "1.0.67",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/thephpleague/flysystem.git",
|
||||
"reference": "021569195e15f8209b1c4bebb78bd66aa4f08c21"
|
||||
"reference": "5b1f36c75c4bdde981294c2a0ebdb437ee6f275e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/021569195e15f8209b1c4bebb78bd66aa4f08c21",
|
||||
"reference": "021569195e15f8209b1c4bebb78bd66aa4f08c21",
|
||||
"url": "https://api.github.com/repos/thephpleague/flysystem/zipball/5b1f36c75c4bdde981294c2a0ebdb437ee6f275e",
|
||||
"reference": "5b1f36c75c4bdde981294c2a0ebdb437ee6f275e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1052,13 +1052,7 @@
|
|||
"sftp",
|
||||
"storage"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://offset.earth/frankdejonge",
|
||||
"type": "other"
|
||||
}
|
||||
],
|
||||
"time": "2020-03-17T18:58:12+00:00"
|
||||
"time": "2020-04-16T13:21:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mcamara/laravel-localization",
|
||||
|
@ -1283,16 +1277,16 @@
|
|||
},
|
||||
{
|
||||
"name": "nikic/php-parser",
|
||||
"version": "v4.3.0",
|
||||
"version": "v4.4.0",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/nikic/PHP-Parser.git",
|
||||
"reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc"
|
||||
"reference": "bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/9a9981c347c5c49d6dfe5cf826bb882b824080dc",
|
||||
"reference": "9a9981c347c5c49d6dfe5cf826bb882b824080dc",
|
||||
"url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120",
|
||||
"reference": "bd43ec7152eaaab3bd8c6d0aa95ceeb1df8ee120",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -1331,7 +1325,7 @@
|
|||
"parser",
|
||||
"php"
|
||||
],
|
||||
"time": "2019-11-08T13:50:10+00:00"
|
||||
"time": "2020-04-10T16:34:50+00:00"
|
||||
},
|
||||
{
|
||||
"name": "opis/closure",
|
||||
|
@ -2578,20 +2572,6 @@
|
|||
],
|
||||
"description": "Symfony HttpKernel Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://symfony.com/sponsor",
|
||||
"type": "custom"
|
||||
},
|
||||
{
|
||||
"url": "https://github.com/fabpot",
|
||||
"type": "github"
|
||||
},
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-03-30T14:59:15+00:00"
|
||||
},
|
||||
{
|
||||
|
@ -3604,16 +3584,16 @@
|
|||
},
|
||||
{
|
||||
"name": "vlucas/phpdotenv",
|
||||
"version": "v3.6.2",
|
||||
"version": "v3.6.3",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/vlucas/phpdotenv.git",
|
||||
"reference": "786a947e57086cf236cefdee80784634224b99fa"
|
||||
"reference": "1b3103013797f04521c6cae5560f604649484066"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/786a947e57086cf236cefdee80784634224b99fa",
|
||||
"reference": "786a947e57086cf236cefdee80784634224b99fa",
|
||||
"url": "https://api.github.com/repos/vlucas/phpdotenv/zipball/1b3103013797f04521c6cae5560f604649484066",
|
||||
"reference": "1b3103013797f04521c6cae5560f604649484066",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
@ -3663,13 +3643,7 @@
|
|||
"env",
|
||||
"environment"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"url": "https://tidelift.com/funding/github/packagist/vlucas/phpdotenv",
|
||||
"type": "tidelift"
|
||||
}
|
||||
],
|
||||
"time": "2020-03-27T23:36:02+00:00"
|
||||
"time": "2020-04-12T15:18:03+00:00"
|
||||
},
|
||||
{
|
||||
"name": "yajra/laravel-datatables-oracle",
|
||||
|
|
|
@ -126,7 +126,7 @@
|
|||
<tr>
|
||||
<td>
|
||||
@if($file->exists() === true)
|
||||
<a href="{{ route('file.download', ['id' => $file->id]) }}"> {{ $file->label }} </a>
|
||||
<a target="_blank" href="{{ route('file.download', ['id' => $file->id]) }}"> {{ $file->label }} </a>
|
||||
@else
|
||||
<span class="alert">missing file: {{ $file->path_name }}</span>
|
||||
@endif
|
||||
|
|
Loading…
Reference in New Issue
Block a user