You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the Spatie Media Library to upload/download images to DO Spaces via S3 driver.
Uploading is working fine. Even download "was" working fine.
Recently, we've added a CDN on DO Spaces. Not sure if that's the cause for downloading damaged images.
The image size is full and similar to the original, however, when I try to open the image I get a message that the image is damaged.
I can open the image from DO Spaces the file exists.
I am simply returning the media to inline steam it
return $media;
If I download the file instead: return response()->download($media->getPath(), $media->file_name);
Then I get this error message:
The file "teams/...photo-1507003211169-0a1dd7228f2d.jpeg" does not exist
As if the host name of the url is not being updated with that of DO spaces. Because, if I take the path above, prepend to it the DO_URL the image opens in the browser.
The package version is "spatie/laravel-medialibrary": "^10.15",
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi there,
I am using the Spatie Media Library to upload/download images to DO Spaces via S3 driver.
Uploading is working fine. Even download "was" working fine.
Recently, we've added a CDN on DO Spaces. Not sure if that's the cause for downloading damaged images.
The image size is full and similar to the original, however, when I try to open the image I get a message that the image is damaged.
I can open the image from DO Spaces the file exists.
I am simply returning the media to inline steam it
return $media;
If I download the file instead:
return response()->download($media->getPath(), $media->file_name);
Then I get this error message:
As if the host name of the url is not being updated with that of DO spaces. Because, if I take the path above, prepend to it the DO_URL the image opens in the browser.
The package version is
"spatie/laravel-medialibrary": "^10.15",
I appreciate your feedback.
Thank you
Bill
Beta Was this translation helpful? Give feedback.
All reactions