Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file upload - says "success" on failure #819

Closed
mclorch opened this issue Jul 15, 2022 · 1 comment
Closed

file upload - says "success" on failure #819

mclorch opened this issue Jul 15, 2022 · 1 comment

Comments

@mclorch
Copy link
Contributor

mclorch commented Jul 15, 2022

I encountered a situation during file upload, where the file got created but not populated.

To accurately detect this error, the success response object should be relocated inside of the if statement checking if the tmp file is readable (line 928):

                if ($out) {

                    $in = @fopen($tmp_name, "rb");
                    if ($in) {
                        while ($buff = fread($in, 4096)) { fwrite($out, $buff); }
                        // TODO - CREATE SUCCESS RESPONSE OBJ HERE INSTEAD!

It would also be nice to provide some more troubleshooting information, e.g. by logging the last error that occurred in case of error.

@prasathmani
Copy link
Owner

This issue is addressed in the new release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants