generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 36
Open
Labels
bugSomething isn't workingSomething isn't working
Description
What happened?
https://stackoverflow.com/questions/68720796/how-can-i-fetch-exifdatalike-gps-with-filepond
Hello, I've been looking into how to obtain metadata (e.g DateTimeOriginal), but I can't find a way to make it work. Do you have any idea how it might work? I've checked that forum, but it doesn't work in the backend.
Thank you in advance.
How to reproduce the bug
add this cdn
<script src="https://cdn.jsdelivr.net/npm/exif-js"></script>in component upload
resources/views/vendor/livewire-filepond/upload.blade.php
add this as option
beforeAddFile: (fileItem) => new Promise(resolve => {
const success = EXIF.getData(fileItem.file, () => {
fileItem.setMetadata('exifdata', EXIF.getAllTags(fileItem.file))
// Added EXIF data to file item, we're done
resolve(true);
})
// Can't read EXIF data, don't add file
if (!success) resolve(false);
})
public function store()
{
//validate
foreach ($this->files as $file) {
$exif = @exif_read_data($file->getRealPath());
dd($exif);
}
}
Package Version
1.5
PHP Version
8.2
Laravel Version
10
Which operating systems does with happen with?
Windows
Notes
No response
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working