Laravel Minio Temporary URL

0 votes

I'm looking for a hacky way to create temporary URLs with Minio

I see on the Laravel docs it says: Generating temporary storage URLs via the temporaryUrl method is not supported when using MinIO.

However from some digging I noticed that I can upload images successfully using:

AWS_ENDPOINT=http://minio:9000

I can't view them because the temporary url is on http://minio:9000/xxx

If I change the AWS endpoint to

AWS_ENDPOINT=http://localhost:9000

The temporary url is on http://localhost:9000/xxx, the signature is validated and the file can be viewed.

The issue exists in this call to make the command. The $command needs to have the host changed but I don't know if I can do that by just passing in an option.

        $command = $this->client->getCommand('GetObject', array_merge([
            'Bucket' => $this->config['bucket'],
            'Key' => $this->prefixer->prefixPath($path),
        ], $options));

There is also the option to just change the baseUrl by providing a temporary_url in the filesystem config. however, because the URL has changed the signature is invalid.

Is there a way I can update the S3Client to use a different host either by passing an option to the getCommand function or by passing a new S3Client to the AWS adapter to use the correct host?

Feb 14, 2023 in Others by Ashwini
• 5,430 points
905 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Others

0 votes
1 answer

Laravel 8 routes to controllers. SEO friendly URL structure

use regex to match the slugs  again use ...READ MORE

answered Feb 17, 2022 in Others by narikkadan
• 63,420 points
1,210 views
0 votes
2 answers

How to get the URL of the current tab in Google Chrome?

Its so simple.... If you want to ...READ MORE

answered Aug 12, 2020 in Others by Steve
• 200 points
2,994 views
0 votes
0 answers

Self Created Laravel Link Not Working

I installed laravel 6.0 through composer and ...READ MORE

Dec 3, 2019 in Others by anonymous
• 120 points
546 views
0 votes
1 answer

count() parameter must be an array or an object that implements countable in laravel

You will have to make one change ...READ MORE

answered Feb 10, 2022 in Others by Rahul
• 9,670 points
6,015 views
0 votes
1 answer

Writing SEO friendly url gets infinite loop asp.net

you should know that regex avoid cases ...READ MORE

answered Feb 11, 2022 in Others by narikkadan
• 63,420 points
614 views
0 votes
1 answer

PHP Convert String to SEO Friendly Url For Bengali Language Type

$string = preg_replace("/[^a-z0-9]/u", "$separator", $string);  change the ...READ MORE

answered Feb 14, 2022 in Others by narikkadan
• 63,420 points
876 views
0 votes
2 answers

Laravel 5.4 to get data form API response

Input::get('var_name') READ MORE

answered Feb 14, 2019 in Blockchain by anonymous
1,427 views
0 votes
1 answer

How to exclude specific folders every time I run 'eb deploy' using AWS EB CLI

If there is not .ebignore file it ...READ MORE

answered Oct 24, 2018 in AWS by Priyaj
• 58,090 points
1,813 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP