iOS base64 encoding -> php decoding -
good afternoon stack overflow
i have issue posting image ios device php-webserver using base64 encoding.
i have converted uiimage string in xcode using;
nsstring *imagestring = [uiimagepngrepresentation(attachmentimage) base64encodedstringwithoptions:0];
fired on server using http post, fine have echo-ed same string , have seen working.
and server-side decoding using;
$decoded = base64_decode($base64string); file_put_contents($targetfile, $decoded);
the smug android guy sitting next me has put version of app , works fine using php script containing above code.
although knowledge of base64 limited, have checked 2 non alpha numeric characters used encoding standard ('+','/') , mentioned earlier have checked communication between app/server - fine.
right thinking there maybe problem converting uiimage png have searched points me @ commands im using.
i have been on day , quick running out of hair pull out - appreciated.
thanks in advance
Comments
Post a Comment