Hello, i'm developing with inertia, but i noticed that inertia cancel the previous requests if new is maked.
I need the "realtime" functionality, like when user types, it is automatically updated in database. The problem is that the user can upload images or videos, and the user can follow writing, so if the user follow writing while image is uploading, the request is canceled and image is not uploades. Anyone know how can i make async requests or something like that? Im using useForm helper from inertia.
This is a video to explain better
https://drive.google.com/file/d/14x2xk7mmcPcjyCtFoYSyaTF_cKzZ0ZlF/view?usp=sharing
const form = useForm({
media_to_upload: [],
media_to_delete:null
});
/**
* Methods
*/
const uploadMedia = (files) => {
form.media_to_upload = files
form.media_to_delete = null
form.post(route('posts.media.upload', {'post':props.post.id}),{
preserveScroll:true,
preserveState:true,
})
form.media_to_upload = []
}