mirror of
https://github.com/YGGverse/Yo.git
synced 2026-04-01 02:05:29 +00:00
update mime on progress function event
This commit is contained in:
parent
3a28bf5967
commit
7cf10079c6
1 changed files with 8 additions and 0 deletions
|
|
@ -203,11 +203,19 @@ foreach($index->search('')
|
||||||
$upload,
|
$upload,
|
||||||
$uploaded
|
$uploaded
|
||||||
) {
|
) {
|
||||||
|
global $request;
|
||||||
|
|
||||||
global $index;
|
global $index;
|
||||||
global $document;
|
global $document;
|
||||||
|
|
||||||
|
if (!$mime = curl_getinfo($request, CURLINFO_CONTENT_TYPE))
|
||||||
|
{
|
||||||
|
$mime = $document->get('mime');
|
||||||
|
}
|
||||||
|
|
||||||
$index->updateDocument(
|
$index->updateDocument(
|
||||||
[
|
[
|
||||||
|
'mime' => $mime,
|
||||||
'time' => time(),
|
'time' => time(),
|
||||||
'code' => 200,
|
'code' => 200,
|
||||||
'index' => 0
|
'index' => 0
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue