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

PHP+Apache Server, the image is here: $_FILES #176

Open
seeeeebas opened this issue Feb 18, 2022 · 1 comment
Open

PHP+Apache Server, the image is here: $_FILES #176

seeeeebas opened this issue Feb 18, 2022 · 1 comment

Comments

@seeeeebas
Copy link

Just spent several houres trying to figure out there the image sent from JS was.
The image is not in the php://input nor in the $_POST.
Other from that thanks alot for this awersome editor.
Cheers.

###img itself
$img='data:'.$_FILES['image']['type'].';base64, '.base64_encode(file_get_contents($_FILES['image']['tmp_name']));

###response to JS
$res=[];
$res['success']=1;
$res['file']=[];
$res['file']['url']=$img;
echo json_encode($res);
exit;

@tom-byrom
Copy link

@seeeeebas you just saved me from a v.large headache. Thank you

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

No branches or pull requests

2 participants