BLUE-5: Look for a DateTimeOriginal tag first before the DateTime flag to identify the actual taken date
This commit is contained in:
parent
aa9eee9bf5
commit
564f0ee9b8
37
app/Http/Requests/UpdatePhotosBulkRequest.php
Normal file
37
app/Http/Requests/UpdatePhotosBulkRequest.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UpdatePhotosBulkRequest extends FormRequest
|
||||
{
|
||||
/**
|
||||
* Determine if the user is authorized to make this request.
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function authorize()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'photo.*.name' => 'required',
|
||||
];
|
||||
}
|
||||
|
||||
public function messages()
|
||||
{
|
||||
return [
|
||||
'photo.*.name.required' => trans('validation.photo_name_required')
|
||||
];
|
||||
}
|
||||
}
|
@ -302,7 +302,11 @@ class PhotoService
|
||||
private function metadataDateTime(array $exifData)
|
||||
{
|
||||
$dateTime = null;
|
||||
if (isset($exifData['DateTime']))
|
||||
if (isset($exifData['DateTimeOriginal']))
|
||||
{
|
||||
$dateTime = $exifData['DateTimeOriginal'];
|
||||
}
|
||||
else if (isset($exifData['DateTime']))
|
||||
{
|
||||
$dateTime = $exifData['DateTime'];
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user