Closed nandosb closed 9 years ago
When the file uploads is success, there is a warning due an undefined variable "$result". $result is only used for displaying errors but isn´t set for success cases
I suggest to add the following snippet in the upload method
UploadsController.php line 64 else{ $result = array('ok' => 'upload success'); $this->set("result", htmlspecialchars(json_encode($result), ENT_NOQUOTES)); $this->response->type('json'); $this->response->statusCode(200); }
Hi, I've updated the code to be very similar to what you've outlined. Can you check and confirm that it works fine now?
Thanks for bringing this up! :) Really appreciate it.
When the file uploads is success, there is a warning due an undefined variable "$result". $result is only used for displaying errors but isn´t set for success cases
I suggest to add the following snippet in the upload method
UploadsController.php line 64 else{ $result = array('ok' => 'upload success'); $this->set("result", htmlspecialchars(json_encode($result), ENT_NOQUOTES)); $this->response->type('json'); $this->response->statusCode(200); }