Closed vinraelll closed 4 months ago
It seems it is related to backend server.
I'll check it asap. Until then; be sure to have latest version of php backend library.
be sure to have latest version of php backend library.
Updated lib on our server to the latest version. Unfortunately, the issue remains.
What is the response from the server when you click the upload butt?
Is it a redirection or it returns an error?
Because it seems it can't parse the returned data.
After clicking on upload button the plugin makes three unsuccessful requests to the server and all have the same response.
Something happens here, If you can remove try-catch blog, you can see the actual error. Not sure what happens for now.
Temporary you can do:
// try {
if (!array_key_exists($query, $route_array)
|| $route_array[$query] !== strtolower($this->request->getMethod())) {
throw new Exception('The query does not have a valid method.');
}
$adapter = $this->storageAdapters[$this->adapterKey];
$readonly_array = ['index', 'download', 'preview', 'search'];
if ($adapter instanceof ReadOnlyFilesystemAdapter && !in_array($query, $readonly_array, true)) {
throw new Exception('This is a readonly storage.');
}
$response = $this->$query();
// } catch (Exception $e) {
// $response = new JsonResponse(['status' => false, 'message' => $e->getMessage()], 400);
// }
Hello,
I believe I know what happened.
We have POST request /api/v1/remote-control-panel/file-manager?adapter=local&path=local%3A%2F%2Fpage_builder&q=upload with payloaded image and content-type: application/json
The exception is thrown here:
I think it's no $this->request at this step. I've found where it inizializing:
So when we have POST method and our content-type is not application/x-www-form-urlencoded, the "request" buddy has not inizialized.
I will fix it tonight. Thx for reporting.
I am planning to rewrite the backend library from scratch, when I have time, also considering a new backend package for Laravel with additional features.
Also, need to create an OpenApi docs for backend.
Great, sounds good.
I am planning to rewrite the backend library from scratch, when I have time, also considering a new backend package for Laravel with additional features.
I will fix it tonight. Thx for reporting.
Thanks for rapid response
Well, the problem was because of "Content-Type". It was using 'application/json' instead of 'multipart/form-data" when uploading.
It should work for now, just sent a fix. I'll refactor the code asap as I mention above.
Thanks for reporting.
It should work for now, just sent a fix.
Updated the package - all works fine for now, thanks. Files upload without any problems now. I guess, we can mark the issue as completed.
When trying to upload any type of files get an error from Uppy package dependency used in Vuefinder:
I've tried to upload various types of images (webp, png, jpg), audio files (mp3), but result remains the same.
Vuefinder usage in my project: