F
Filament7mo ago
HeyWeb

FileUpload It doesn't preview

FileUpload It doesn't preview, it stays loading
No description
9 Replies
christmex
christmex7mo ago
do u using laragon? make sure the APP_URL correct or maybe u can show us, the network tab
HeyWeb
HeyWebOP7mo ago
In CRUD it works correctly, it does not work in editing, it keeps loading
No description
HeyWeb
HeyWebOP7mo ago
public static function form(Form $form): Form { return $form ->schema([ Forms\Components\TextInput::make('name')->required()->label('Descripción'), Forms\Components\FileUpload::make('image_url')->image()->label('Imagen') ->preserveFilenames(), ]); }
awcodes
awcodes7mo ago
It can’t find the image. Either your .env APP_URL is off or you need and ASSET_URL in your env that point to the same app_url.
HeyWeb
HeyWebOP7mo ago
i added APP_URL=http://127.0.0.1:8000 ASSET_URL=http://127.0.0.1:8000 and it stays the same
LeandroFerreira
LeandroFerreira7mo ago
php artisan storage:link ?
HeyWeb
HeyWebOP7mo ago
yes
LeandroFerreira
LeandroFerreira7mo ago
Console errors?
HeyWeb
HeyWebOP7mo ago
Solicitud desde otro origen bloqueada: la política de mismo origen impide leer el recurso remoto en http://127.0.0.1:8000/storage/imagenes/cursos/course-5.jpg (razón: falta la cabecera CORS 'Access-Control-Allow-Origin'). Código de estado: 200. Uncaught (in promise) TypeError: NetworkError when attempting to fetch resource. handlePageExpiry http://localhost:8000/livewire/livewire.js?id=239a5c52:4271 sendRequest http://localhost:8000/livewire/livewire.js?id=239a5c52:4250 Solucionado APP_URL=http://localhost:8000 Thanks
Want results from more Discord servers?
Add your server