myster
myster
FFilament
Created by Wirkhof on 2/20/2024 in #❓┊help
Unable to upload a file on a live server
Hello, I feel like I can't help you, but I think you can help me. trying to save files to s3 but I'm facing an error
Unable to check existing for: livewire-tmp/Lv9otp3WPg8ga2o3zJ3OFuErwjZxDy-metabG9nby1jb21wbGV0ZWQtMi5qcGcucG5n-.png
Unable to check existing for: livewire-tmp/Lv9otp3WPg8ga2o3zJ3OFuErwjZxDy-metabG9nby1jb21wbGV0ZWQtMi5qcGcucG5n-.png
Can you help me by telling me how you configured s3 on the filament?
3 replies
FFilament
Created by myster on 2/17/2024 in #❓┊help
AWS S3 with Filament Laravel
some help?
5 replies
FFilament
Created by myster on 2/17/2024 in #❓┊help
AWS S3 with Filament Laravel
~.env
FILESYSTEM_DISK=s3
FILAMENT_FILESYSTEM_DISK=s3
APP_URL=http://127.0.0.1:8000
AWS_ACCESS_KEY_ID=AKIAS...
AWS_SECRET_ACCESS_KEY=B/AOPA...
AWS_DEFAULT_REGION=sa-east-1
AWS_BUCKET=vistu...
AWS_USE_PATH_STYLE_ENDPOINT=false
AWS_URL=https://(vistu...).s3.sa-east-1.amazonaws.com/livewire-tmp/
FILESYSTEM_DISK=s3
FILAMENT_FILESYSTEM_DISK=s3
APP_URL=http://127.0.0.1:8000
AWS_ACCESS_KEY_ID=AKIAS...
AWS_SECRET_ACCESS_KEY=B/AOPA...
AWS_DEFAULT_REGION=sa-east-1
AWS_BUCKET=vistu...
AWS_USE_PATH_STYLE_ENDPOINT=false
AWS_URL=https://(vistu...).s3.sa-east-1.amazonaws.com/livewire-tmp/
~ImageResource
Section::make('image')
->schema([
FileUpload::make('image_training')
->disk('s3')
->label('Arquivo'),
]),
Section::make('image')
->schema([
FileUpload::make('image_training')
->disk('s3')
->label('Arquivo'),
]),
~cors.php
<?php

return [

/*
|--------------------------------------------------------------------------
| Cross-Origin Resource Sharing (CORS) Configuration
|--------------------------------------------------------------------------
|
| Here you may configure your settings for cross-origin resource sharing
| or "CORS". This determines what cross-origin operations may execute
| in web browsers. You are free to adjust these settings as needed.
|
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
*/

'paths' => ['api/*', 'sanctum/csrf-cookie'],

'allowed_methods' => ['*'],

'allowed_origins' => ['*'],

'allowed_origins_patterns' => [],

'allowed_headers' => ['*'],

'exposed_headers' => [],

'max_age' => 0,

'supports_credentials' => false,

];
<?php

return [

/*
|--------------------------------------------------------------------------
| Cross-Origin Resource Sharing (CORS) Configuration
|--------------------------------------------------------------------------
|
| Here you may configure your settings for cross-origin resource sharing
| or "CORS". This determines what cross-origin operations may execute
| in web browsers. You are free to adjust these settings as needed.
|
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
*/

'paths' => ['api/*', 'sanctum/csrf-cookie'],

'allowed_methods' => ['*'],

'allowed_origins' => ['*'],

'allowed_origins_patterns' => [],

'allowed_headers' => ['*'],

'exposed_headers' => [],

'max_age' => 0,

'supports_credentials' => false,

];
Comments: Bucket Access (Public) Bucket Policy (It's empty) CORS on AWS S3 (It is empty)
5 replies
FFilament
Created by myster on 2/17/2024 in #❓┊help
AWS S3 with Filament Laravel
#I'll put the configuration snippets in the files here ~filesystem.php
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'throw' => false,
],
's3' => [
'driver' => 's3',
'key' => env('AWS_ACCESS_KEY_ID'),
'secret' => env('AWS_SECRET_ACCESS_KEY'),
'region' => env('AWS_DEFAULT_REGION'),
'bucket' => env('AWS_BUCKET'),
'url' => env('AWS_URL'),
'endpoint' => env('AWS_ENDPOINT'),
'use_path_style_endpoint' => env('AWS_USE_PATH_STYLE_ENDPOINT', false),
'throw' => false,
],
~livewire.php
'temporary_file_upload' => [
'disk' => "s3", // Example: 'local', 's3' | Default: 'default'
'rules' => null, // Example: ['file', 'mimes:png,jpg'] | Default: ['required', 'file', 'max:12288'] (12MB)
'directory' => null, // Example: 'tmp' | Default: 'livewire-tmp'
'middleware' => null, // Example: 'throttle:5,1' | Default: 'throttle:60,1'
'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs...
'png', 'gif', 'bmp', 'svg', 'wav', 'mp4',
'mov', 'avi', 'wmv', 'mp3', 'm4a',
'jpg', 'jpeg', 'mpga', 'webp', 'wma',
],
'max_upload_time' => 5, // Max duration (in minutes) before an upload is invalidated...
],
'temporary_file_upload' => [
'disk' => "s3", // Example: 'local', 's3' | Default: 'default'
'rules' => null, // Example: ['file', 'mimes:png,jpg'] | Default: ['required', 'file', 'max:12288'] (12MB)
'directory' => null, // Example: 'tmp' | Default: 'livewire-tmp'
'middleware' => null, // Example: 'throttle:5,1' | Default: 'throttle:60,1'
'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs...
'png', 'gif', 'bmp', 'svg', 'wav', 'mp4',
'mov', 'avi', 'wmv', 'mp3', 'm4a',
'jpg', 'jpeg', 'mpga', 'webp', 'wma',
],
'max_upload_time' => 5, // Max duration (in minutes) before an upload is invalidated...
],
5 replies
FFilament
Created by myster on 2/14/2024 in #❓┊help
Error [AWS S3]: Unable to check existence for: livewire-tmp/
Thank you very much for your attention! I will solve it and let you know here, leaving what I did wrong and how I solved it to help other colleagues in the same situation. Thank you very much @Andrew Wallo
27 replies
FFilament
Created by myster on 2/14/2024 in #❓┊help
Error [AWS S3]: Unable to check existence for: livewire-tmp/
One question, is it necessary to add some CORS to the bucket?
27 replies
FFilament
Created by myster on 2/14/2024 in #❓┊help
Error [AWS S3]: Unable to check existence for: livewire-tmp/
I tested it both ways, both "livewire-tmp" and "test". Both return the same error. I was reading some documents here. The error cannot be in CORS?
return [

'paths' => ['api/*', 'sanctum/csrf-cookie', ''],

"AllowedMethods" => [
"GET",
"PUT",
"POST",
"DELETE"
],

'allowed_origins' => ['http://127.0.0.1:8000'],

'allowed_origins_patterns' => [],

'allowed_headers' => ['*'],

'exposed_headers' => ['
"x-amz-server-side-encryption",
"x-amz-request-id",
"x-amz-id-2",
"Content-Type"
'],

'max_age' => 0,

'supports_credentials' => false,

];
return [

'paths' => ['api/*', 'sanctum/csrf-cookie', ''],

"AllowedMethods" => [
"GET",
"PUT",
"POST",
"DELETE"
],

'allowed_origins' => ['http://127.0.0.1:8000'],

'allowed_origins_patterns' => [],

'allowed_headers' => ['*'],

'exposed_headers' => ['
"x-amz-server-side-encryption",
"x-amz-request-id",
"x-amz-id-2",
"Content-Type"
'],

'max_age' => 0,

'supports_credentials' => false,

];
27 replies
FFilament
Created by myster on 2/14/2024 in #❓┊help
Error [AWS S3]: Unable to check existence for: livewire-tmp/
No description
27 replies
FFilament
Created by myster on 2/14/2024 in #❓┊help
Error [AWS S3]: Unable to check existence for: livewire-tmp/
I will do what you said and test
27 replies
FFilament
Created by myster on 2/14/2024 in #❓┊help
Error [AWS S3]: Unable to check existence for: livewire-tmp/
yes
27 replies
FFilament
Created by myster on 2/14/2024 in #❓┊help
Error [AWS S3]: Unable to check existence for: livewire-tmp/
not at all, I'm very happy that you're helping me
27 replies
FFilament
Created by myster on 2/14/2024 in #❓┊help
Error [AWS S3]: Unable to check existence for: livewire-tmp/
'temporary_file_upload' => [
'disk' => null, // Example: 'local', 's3' | Default: 'default'
'rules' => null, // Example: ['file', 'mimes:png,jpg'] | Default: ['required', 'file', 'max:12288'] (12MB)
'directory' => null, // Example: 'tmp' | Default: 'livewire-tmp'
'middleware' => null, // Example: 'throttle:5,1' | Default: 'throttle:60,1'
'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs...
'png', 'gif', 'bmp', 'svg', 'wav', 'mp4',
'mov', 'avi', 'wmv', 'mp3', 'm4a',
'jpg', 'jpeg', 'mpga', 'webp', 'wma',
],
'max_upload_time' => 5, // Max duration (in minutes) before an upload is invalidated...
],
'temporary_file_upload' => [
'disk' => null, // Example: 'local', 's3' | Default: 'default'
'rules' => null, // Example: ['file', 'mimes:png,jpg'] | Default: ['required', 'file', 'max:12288'] (12MB)
'directory' => null, // Example: 'tmp' | Default: 'livewire-tmp'
'middleware' => null, // Example: 'throttle:5,1' | Default: 'throttle:60,1'
'preview_mimes' => [ // Supported file types for temporary pre-signed file URLs...
'png', 'gif', 'bmp', 'svg', 'wav', 'mp4',
'mov', 'avi', 'wmv', 'mp3', 'm4a',
'jpg', 'jpeg', 'mpga', 'webp', 'wma',
],
'max_upload_time' => 5, // Max duration (in minutes) before an upload is invalidated...
],
27 replies
FFilament
Created by myster on 2/14/2024 in #❓┊help
Error [AWS S3]: Unable to check existence for: livewire-tmp/
🥹 I'm glad it was the only one I edited. I have backup, I will return to default.
27 replies
FFilament
Created by myster on 2/14/2024 in #❓┊help
Error [AWS S3]: Unable to check existence for: livewire-tmp/
This is my livewire.php in: vendor\livewire\livewire\config\livewire.php
27 replies
FFilament
Created by myster on 2/14/2024 in #❓┊help
Error [AWS S3]: Unable to check existence for: livewire-tmp/
<?php

return [

'class_namespace' => 'App\\Livewire',

'view_path' => resource_path('views/livewire'),

'layout' => 'components.layouts.app',

'lazy_placeholder' => null,

'temporary_file_upload' => [
'disk' => "s3",
'path' => 'livewire-tmp',
'rules' => null,
'directory' => null,
'middleware' => null,
'preview_mimes' => [
'png', 'gif', 'bmp', 'svg', 'wav', 'mp4',
'mov', 'avi', 'wmv', 'mp3', 'm4a',
'jpg', 'jpeg', 'mpga', 'webp', 'wma',
],
'max_upload_time' => 5,
],

'render_on_redirect' => false,

'legacy_model_binding' => false,

'inject_assets' => true,

'navigate' => [
'show_progress_bar' => true,
'progress_bar_color' => '#2299dd',
],

'inject_morph_markers' => true,

'pagination_theme' => 'tailwind',
];
<?php

return [

'class_namespace' => 'App\\Livewire',

'view_path' => resource_path('views/livewire'),

'layout' => 'components.layouts.app',

'lazy_placeholder' => null,

'temporary_file_upload' => [
'disk' => "s3",
'path' => 'livewire-tmp',
'rules' => null,
'directory' => null,
'middleware' => null,
'preview_mimes' => [
'png', 'gif', 'bmp', 'svg', 'wav', 'mp4',
'mov', 'avi', 'wmv', 'mp3', 'm4a',
'jpg', 'jpeg', 'mpga', 'webp', 'wma',
],
'max_upload_time' => 5,
],

'render_on_redirect' => false,

'legacy_model_binding' => false,

'inject_assets' => true,

'navigate' => [
'show_progress_bar' => true,
'progress_bar_color' => '#2299dd',
],

'inject_morph_markers' => true,

'pagination_theme' => 'tailwind',
];
27 replies
FFilament
Created by myster on 2/14/2024 in #❓┊help
Error [AWS S3]: Unable to check existence for: livewire-tmp/
one moment
27 replies
FFilament
Created by myster on 2/14/2024 in #❓┊help
Error [AWS S3]: Unable to check existence for: livewire-tmp/
@Leandro Ferreira pode me ajudar?
27 replies
FFilament
Created by myster on 2/14/2024 in #❓┊help
Error [AWS S3]: Unable to check existence for: livewire-tmp/
any help !?
27 replies
FFilament
Created by myster on 2/4/2024 in #❓┊help
I need help with Multi tenancy
It worked guys!! Your help was essential! For those who visit this chat, I also advise you to watch this video: https://www.youtube.com/watch?v=weL24ENTZ3w&list=PL6tf8fRbavl3jfL67gVOE9rF0jG5bNTMi&index=18
19 replies
FFilament
Created by myster on 2/4/2024 in #❓┊help
I need help with Multi tenancy
Thanks for the help guys, I'll get it here @cvc @Tieme @Tim van Heugten
19 replies