Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

638
Visualizações
Laravel: Use Linode's Storage Object as an alternative to AWS S3

Linode's Object Storage is marked as being S3 compatible. Knowing this I thought that I can simply use Linode's credentials in my filesystems.php and use ->disk('s3') to upload and download files but apparently this is not the case.

I have installed all required S3 PHP packages as suggested in Laravel's docs.

My .env has:

AWS_ACCESS_KEY_ID=foo
AWS_SECRET_ACCESS_KEY=bar
AWS_DEFAULT_REGION=DE
AWS_BUCKET=my-linode-storage-object.eu-central-1.linodeobjects.com

In logs I get exception to Could not resolve host. It tries to concatenate AWS endpoint with what I provided above so no-brainer that it doesn't work. Should I install completely different package to handle Linode's Storage Object connections?

I don't see much tutorials on the web on how to use Linode's Storage Object in Laravel apps. Any links or hints would be appreciated.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

From the laravel docs just install one of the required Composer Packages

$ composer require league/flysystem-aws-s3-v3

Do not install league/flysystem-cached-adapter yet, since that would require more configuration.

Next, add a new disk that uses the s3 driver under the configuration filesytems file config/filesystems.php

'linode' => [
    'driver' => 's3',
    'key' => env('LINODE_KEY'),
    'secret' => env('LINODE_SECRET'),
    'endpoint' => env('LINODE_ENDPOINT'),
    'region' => env('LINODE_REGION'),
    'bucket' => env('LINODE_BUCKET'),
],

Add the new the environment variables to your project's .env file:

LINODE_KEY="KEYUNDERDOUBLEQUOTES"
LINODE_SECRET="SECRETUNDERDOUBLEQUOTES"
LINODE_ENDPOINT="https://eu-central-1.linodeobjects.com"
LINODE_REGION="eu-central-1"
LINODE_BUCKET="bucket-name"

I usually include the variables under "" to make sure it works with symbols. Also include http or https under LINODE_ENDPOINT.

Now that you have everything set up, you can now use this disk on your laravel code ->disk('linode')

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda