Level 75
Do you have correct url?
And that https://i.ibb.co, I have heard of https://imgbb.com/, but not familiar with that one.
Hello I am trying upload file via FilePond gives this error https://i.ibb.co/MG79fx2/23d.png
<input id="photos" name="image" type="file">
<script>
const inputElement = document.querySelector('input[id="photos"]');
const pond = FilePond.create( inputElement );
FilePond.setOptions({
server:{
url: '/uploads',
headers: {
'X-CSRF-TOKEN': '{{ csrf_token() }}'
}
}
});
</script>
Route::post('/uploads', [App\Http\Controllers\UploadController::class, 'uploads']);
public function uploads(Request $request)
{
$image = $request->file('image');
$name_gen = hexdec(uniqid()).'.'.$image->getClientOriginalExtension();
$image->move("uploads/",$name_gen);
}
When you access your site do you see folder name or /public/ in the URL?
Your uploads is using /uploads This is only correct if your project is in the document root
Please or to participate in this conversation.