php - Copy(): File name is longer than maximum allowed path ... Base64 image -
i have "drag & drop" image uploader. sending image module via ajax "base64 image"
, use "copy()"
move image.
for example: copy($image_in_b64, $destination);
it returns
copy(): file name longer maximum allowed path length on platform (4096): data:image/jpeg;base64,/9j/4qayrxhpzgaasukqaagaa ...
everything works perfect on local server not able upload on deployed server. how can fix this? in server config (what)?
thank comments, had encode image , had upload it.
solution:
$data = //image in base64 list($img_type, $data) = explode(';', $data); list(, $data) = explode(',', $data); $data = base64_decode($data); file_put_contents($path, $data);
Comments
Post a Comment