I finaly found the solution that worked for me.
Many controllers return a url of the file uploaded in a json. Well I needed to add 'uploaded' => true to the json returned by your php code :
return new JsonResponse([
url' => $fileUrl,
uploaded' => true
]);