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
before I change my filesystem from local to s3 I have a command which compresses the image size like this
$image = Image::make($media->file);
$fullPath = $media->file; // in local filesystem was like this. https://domain.com/storage/foobar.pngif ($media->disk != 's3') {
$filePath = str_replace('/storage', 'public', parse_url($media->file, PHP_URL_PATH));
$fullPath = storage_path('app/' . $filePath);
}
$image->save($fullPath, 70);
in local or public filesystems the code works fine but when I changed the filesystem to s3, It could not compress the file since the file path will be something like this
Encoding format (png?X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=99120f29-11e6-4c3a-aa0a-e62e5241025e%2F20240306%2Fsimin%2Fs3%2Faws4_request&X-Amz-Date=20240306T204408Z&X-Amz-SignedHeaders=host&X-Amz-Expires=3360&X-Amz-Signature=b10e0ce0908d6c8944217caa971355b84d807c44ce0a9f75b881d903f197984b) is not supported.
in this situation does the package can compress the file with other method or something else
The text was updated successfully, but these errors were encountered:
I would not use the save() method here to transfer files to remote data storage, as it is primarily designed for the local file system.
I would use one of the encoder methods to get the raw image data. Then you can do what you want with it: See #431 (comment). Data compression and transfer to S3 is not part of this library.
before I change my filesystem from local to s3 I have a command which compresses the image size like this
in local or public filesystems the code works fine but when I changed the filesystem to s3, It could not compress the file since the file path will be something like this
and the error is like this
in this situation does the package can compress the file with other method or something else
The text was updated successfully, but these errors were encountered: