editor-js / editor-js/image

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

Open
#176 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
285
Forks
307
PR merge metrics
No merged PRs in 30d

Description

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;

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.