Merged in BLUE-5-modified-photos-dont-retain-their (pull request #2)
BLUE-5: Look for a DateTimeOriginal tag first before the DateTime flag to identify the actual taken date
This commit is contained in:
commit
975c4938b4
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)
|
private function metadataDateTime(array $exifData)
|
||||||
{
|
{
|
||||||
$dateTime = null;
|
$dateTime = null;
|
||||||
if (isset($exifData['DateTime']))
|
if (isset($exifData['DateTimeOriginal']))
|
||||||
|
{
|
||||||
|
$dateTime = $exifData['DateTimeOriginal'];
|
||||||
|
}
|
||||||
|
else if (isset($exifData['DateTime']))
|
||||||
{
|
{
|
||||||
$dateTime = $exifData['DateTime'];
|
$dateTime = $exifData['DateTime'];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user