addCustomRemoteHeaders or addCustomHeaders #2589
Unanswered
sitesurfer
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all, trying to upload SVG files and have come across the S3 issue with the mime type.
Did some digging and can see that there are two methods as above which should be ok, however - when i try to use these methods on a livewire upload - I get a message as follows:
Call to undefined method Spatie\MediaLibraryPro\PendingMediaLibraryRequestHandler::addCustomRemoteHeaders()
This being my snippet:
$formSubmission->addFromMediaLibraryRequest($this->upload_media)
->addCustomRemoteHeaders($svgHeader)
->usingFileName( function(MediaLibraryRequestItem $item) {
return Str::random(40).".".pathinfo($item->name,PATHINFO_EXTENSION); })
->usingName("Image for ".(ucwords($this->accountSlug)))
->toMediaCollection('le_media_item');
Can anyone point me where I am getting this wrong please?
Beta Was this translation helpful? Give feedback.
All reactions