Uppy "Upload failed" message
Posted: Tue Feb 18, 2025 8:36 am
Since updating to the latest version Uppy is throwing an error where it was OK previously.
I have used the example at uppy.io to guide me.
I am calling a PHP procedure using uppy.setMeta, uploading a CSV and processing it before loading into the database. The procedure works OK, but Uppy reports an upload failure with an alert message containing "undefined" shown twice.
In the server logs I have this:
[Tue Feb 18 06:49:48.726713 2025] [php:warn] [pid 73461:tid 73461] [client 192.168.1.34:41874] PHP Warning: http_response_code(): Cannot set response code - headers already sent (output started at /var/www/forte/core/nucommon.php(1473) : eval()'d code:69) in /var/www/forte/core/nucommon.php(1473) : eval()'d code on line 235, referer: https://myhhost/forte/index.php
If I comment out the calls to http_response_code in my PHP this error goes away, but the Uppy example uses this so why the PHP Warning?
I am having trouble tracking the problem down - I have tried console.log(result) in a nuOnFileUploadComplete() but can't make sense of that. I have other similar procedures that still work.
Any help would be appreciated though I appreciate there's not much here to go on...
Database: Arch Linux 11.7.2-MariaDB
PHP: 8.4.3
nuBuilder DB: V.4.5-2025.02.13.01
nuBuilder Files: V.4.5-2025.02.12.00
Neil.
I have used the example at uppy.io to guide me.
I am calling a PHP procedure using uppy.setMeta, uploading a CSV and processing it before loading into the database. The procedure works OK, but Uppy reports an upload failure with an alert message containing "undefined" shown twice.
In the server logs I have this:
[Tue Feb 18 06:49:48.726713 2025] [php:warn] [pid 73461:tid 73461] [client 192.168.1.34:41874] PHP Warning: http_response_code(): Cannot set response code - headers already sent (output started at /var/www/forte/core/nucommon.php(1473) : eval()'d code:69) in /var/www/forte/core/nucommon.php(1473) : eval()'d code on line 235, referer: https://myhhost/forte/index.php
If I comment out the calls to http_response_code in my PHP this error goes away, but the Uppy example uses this so why the PHP Warning?
I am having trouble tracking the problem down - I have tried console.log(result) in a nuOnFileUploadComplete() but can't make sense of that. I have other similar procedures that still work.
Any help would be appreciated though I appreciate there's not much here to go on...
Database: Arch Linux 11.7.2-MariaDB
PHP: 8.4.3
nuBuilder DB: V.4.5-2025.02.13.01
nuBuilder Files: V.4.5-2025.02.12.00
Neil.