I know how to retrieve the base64 image from the canvas using javascript on the HTML page:
var url = canvas.toDataURL("image/png");
url.replace(/^data:image\/(png|jpg);base64,/, "");
now i want to send this information to the server and create the image.
i want to do something like:
router.post('/createImage', function (req, res) {
var base64image = //i need to get the base64 image here
var picPath = path.normalize('./public/images/users/pic.png');
fs.writeFile(picPath, url, 'base64', function(err) {
console.log(err);
});
});
how can i do that?
Related
I have a page that has jquery and the amazon SDK. There is text in an area box that the user can change. I successfully make the request to Amazon. I get back the PCM AudioStream (Int16Array). How do I then convert this stream to a downloadable PCM file? When the file downloads, the file is useless and can't be played. The file does have a size greater than 0, so that makes me believe there is data there.
<script>
AWS.config.region = 'us-east-1';
AWS.config.accessKeyId = 'CANDY';
AWS.config.secretAccessKey = 'CANES';
var polly = new AWS.Polly({apiVersion: '2016-06-10'});
var params = {
OutputFormat: 'pcm',
Text: 'Text from the textbox',
VoiceId: 'Joey',
SampleRate: '16000',
TextType: 'text'
};
polly.synthesizeSpeech(params, function(err, data) {
if (err){
console.log(err, err.stack); // an error occurred
} else {
var stream = new Int16Array(audioStream);
var arrayBuffer = stream.buffer;
var blob = new Blob([arrayBuffer], {type: 'audio/pcm'});
var url = URL.createObjectURL(blob);
.....set href for link to url.......
}
});
</script>
If you are sure the url object is correct (can you download it from a separate browser tab?), I would use JQuery to dynamically change your DOM, as per this answer How to change the href for a hyperlink using jQuery
I am getting weird image data in response. Is there any Idea how I can convert this and store as .jpeg file using Node.js
����\u0000\u0010JFIF\u0000\u0001\u0001\u0001\u0000`\u0000`\u0000\u0000��\u0000C\u0000\b\u0006\u0006\u0007\u0006\u0005\b\u0007\u0007\u0007\t\t\b\n\f\u0014\r\f\u000b\u000b\f\u0019\u0012\u0013\u000f\u0014\u001d\u001a\u001f\u001e\u001d\u001a\u001c\u001c $.\' ",#\u001c\u001c(7),01444\u001f\'9=82<.342��\u0000C\u0001\t\t\t\f\u000b\f\u0018\r\r\u00182!\u001c!22222222222222222222222222222222222222222222222222��\u0000\u0011\b\u0003\u0000\u0004\u0000\u0003\u0001"\u0000\u0002\u0011\u0001\u0003\u0011\u0001��\u0000\u001f\u0000\u0000\u0001\u0005\u0001\u0001\u0001\u0001\u0001\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b��\u0000�\u0010\u0000\u0002\u0001\u0003\u0003\u0002\u0004\u0003\u0005\u0005\u0004\u0004\u0000\u0000\u0001}\u0001\u0002\u0003\u0000\u0004\u0011\u0005\u0012!1A\u0006\u0013Qa\u0007"q\u00142���\b#B��\u0015R��$3br�\t\n\u0016\u0017\u0018\u0019\u001a%&\'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz���������������������������������������������������������������������������\u0000\u001f\u0001\u0000\u0003\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b��\u0000�\u0011\u0000\u0002\u0001\u0002\u0004\u0004\u0003\u0004\u0007\u0005\u0004\u0004\u0000\u0001\u0002w\u0000\u0001\u0002\u0003\u0011\u0004\u0005!1\u0006\u0012AQ\u0007aq\u0013"2�\b\u0014B����\t#3R�\u0015br�\n\u0016$4�%�\u0017\u0018\u0019\u001a&\'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz��������������������������������������������������������������������������\u0000\f\u0003\u0001\u0000\u0002\u0011\u0003\u0011\u0000?\u0000��(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(����Yi�wi\u001f��B�*g\u001b��#��#\u0016����\u0017\u0016�L�vD\u000e?\u0011���\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n��!=��0ʺ\u0015?��h�\f�\f�d�Ɩ��\u000bhվ�#?��Z�����F��6�W\u0011r}%l~�V�\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QT�MV�E����nc����;��\u000e��\n\u0000�Exf������K_\t���G�.\'Rr}B�\u0007�k�������E�����\u0000��%X#���\u0000:\u0000�z[�!�\u0000[4q�\u0000��Vuϊ4\u000b#MƷ�Ŏ��S�k爼\u000b�Ml\u0006�&�����=��P{0\u001c�c��s�xr��wG�aV\\\u001f%�f�\u0003А�\u0011�`���\u0000�R�>\r���\u0000\u0011X�\u001d�}�\u0000�5�7�_\u0005E����\u0011�;Y?�\u0015��[�V�Ky#c�\u0015?Fl���{��2�,�F9�\u0014�ց\\�K���\u001b��{\u001dNs��J��o�Y7?\u001fSi\u0016~\u001d��c5�\u001f�\u0015��X�_�zk����\u0000<���Dc\u0019M-\u0007�T7��\u0003=M�<k�s\u001e�`��s9������ħ���b�\\�\u0000���M���p�V��\u0000l�\u001f�M>3��\u0000�b}\u0014�\u0000z{�n�s}�4��B��\u0000f�O�o\u001b7Cb?ݶ���4>3ֻ\\m�\nC�=t�/\\}\t�\u000fL�\u0000�������,��\u0000�������\u0000ۑ�1�\u0000��^�\u001a���\u0006h\u001e3�\b�����=4�`�����\u0000���\u000f�^6���+#�?�y��lj���W��ښ�>#x�1��\r��A%\u0000zd\u001d�R��,4���R\u000f���\u001f�\u0006��H�\u0003 ���C�g����\u0017g�A����?� ��jS��\u000f��\u0007�/�\r�/��l\u000f�.\u0018U��\u0000h��\u0000��\u0004\'��������W���� ���o洭�O��1\'�T���v��\u0000d�\u0007���\u0011nz�nO�\r�?�%N��.��x~��2��W����\\��\u0000H�&�\u0000K� )���#�K�\u001f\f?�ȡ�\u0000�XP\u0007���\u0007��\u0000�i�j��\b�j�\u0007ǿ\u0007�ؖ\u001dR\u000fw�\u0004��k牼Oi<���t���\u0000\u0004&E\u001f�\u0013Q�oKo����ˆ\u0014\u0001�\u0005��_\u0002\\�myD��\t\u0017�ۊٶ��\u0000�n�\u0010x�Lbz\u0003p����!�tG�cy\u001ez��\u001f�)\f�\u0004�^�?��V�\u000f�m�;\u000b�\u0005�����\u0011ʭ��[��c�JG\u000fo�4/ش\f�~+].���\u0014i�F��h�\u0003�r�1_���\u0014\u0001��\u0015��G��\u001c _5�MQ?�>S��N?�����+\\��V���n��dI��;[��\u000fJ��[?��\u0018��$�k\'\'\u001b/�x1��\u0003�������\u0011-��3�z<N\u0018\u001f�P\u0004�QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000s�\u001c�Z��jǔ�\f�z\u0007�\u001b���\n������Z��y����|nC��t4\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QEp_\u0011~!��(R��\u0012�\u0017\u000b�4#+\u0012�\f�S�w��\u000e�k�{e\u0006y��\u001e\u0001���������\bZ�\u0000���\u0000\u001a�?�\u0017\u0017\u001a��y�kM=Ý�Z���sʷ#(�\u0011�N\u0005\u0000}�����\u0000�B���\u0000/��˟\u0014�gw�o\u0013�#���[��\u0002)�B\u0003��V�I���\\i�.�\u0019qך�Ii`cա�?��\u0000v�\u0006�����&2F�\u00001�d�;确��gb�\u0011\u001d$�����U�J�|d��\u0002��1��W�\\�\f�)�Ky�?]��:��\u0010����\u001b(��\u0003���[������OL�C���7D4�e܌F\u000bL�N=9 ~���\u0000\u0007�;m\u001f�luۑ\u001c��JY\u001bf\u0004J\t\\\u000f~9?�zeZ����>G���\t�4����F?�<�%�3t��~��}\u0001EW*\u000b\u001f=7��\u0014��+5��?£?\u0004�T�\u0000ŧ��s�\u0000���4Qd\u0016G�g�?�\u001c`��C����\u0000����}�+�ޒ��i?���F�\\�,|�g�\u0014��4���\'�\u0000\u0011#���Q�Qҿ\u0007�&����D3���<������\u000e�\u0000�Mg�|\u0007��\u0004�1�܁�˸\nO��\u0005}GE\u001c�\u000f���\u0015��Ͷ�����\u0012�\u000f�t���\u0000\n��c�e�O��\u001a���\u001e ��Α&����\n\u0010�Te��EQܟ�Ҽ\u0017��\u001e5���\u001d\u0012+{\u0018�W)�?�x�*ZH\u000e\u000f�\u0015�\u0000�Y��\u0000�\u001c�&�\u0007����i�9�$q�wcn�P\u0006I�S�L���\u0017o\u0011_)=�M��\u001cS����h\u0015��~�T`C,��\u0002\u000fc�\u001a�\u0000�\u0000$q��:R����FKu�\u0004����̰�C$ҷ�HԳ\u001f�\u001c�����\u0000\u0017݄0�oS*��kvQ��_\u0003x��\u0010�\u0011�`i�z�\u000bƑ��^���8=�?\u001a��\u000b||���x�u�3�5&`��$�b\u0006\'��\f\u000fΩ%�\u000f/o�><U�tP}��D�\u0000�UV_�\u001e9����\u001b��F�F�����\u0001���\u000e|g\u0017-��K���[�VMχ��2E֑\t\u001d|�w_�_oQG"\u0003�\u0006VF���\u001dA\u0018��ھ��M���\u0000��+i��̉[��Ǹ�\u0017�����\u001c�\u0019�R-�\u001f�R�\u0003�%b��#�U�MoV�9��n��\u0000�s0��%�W�y���m\u0017�����R�\u001e\u0003s��\u0011��ԣ�\u0000f����էį\u0012ڨIna��\u0005�\nG�F\t�Mmi\u0014��Y\']\u0012;{�\\\u0019,�1�=�r?\u0003��t�\u0000\u0016�\u0014iz\u0007���|7i$1۾�ȼד(x\u000e7\u0012x<\u001f��x�KM\u0001���>4���oqwot�p\u0016��i�����?]��WӼA��R,1���\u0011��Ӯ�1�\u0001���r=��to\u0017��L+h\'7\u0016\u0001�\u000bY��S��=cou"���j��\u000f\u0000�[�RD��yd \f\u0017�d\u001e��\u0000X=���\u000fZ��\'��\u0004�\tRX�e]\u000eA\u001eƘ\u0012�E\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QE\u0014\u0001�ˈ>!۱\'7:kƾ�$\u0007�\u0000g����o�^-���8M�\u0010\u001f��#�Z��\u0000��(\u0000��(\u0000��(\u0000��(\u0000��(\u0000��(\u0001�Ȑ����cE,�z\u0000:��\u001fĺ�� �>���;%�� �\u0000\fc�\u001f�\u0015��\u0000\u0019<Bt\u0005��\u000f��To�&:������\u001f�*���a\u001c"%8P:P\u0004qH�W��9U9�ߥn�Y\b��\b�\u0017�L�\u001e�\u000e�R��K7ҷ��̇o�=3M\t�\f\u0015�/8#\u0015�F\u001a���G��W��G���J0,ϼ��\u0000�g��\u0019j?�V�S͍���H����ULm�*֞ظ\u001e��O��\u001f�(\u0006}\u0017�j�o>\u0017iAx0y���9��Wy^A�\u0002��\u0000`kZk7�z�\u0016U�\f���z�j�\u0000��)�QE\u0014\u0000QE\u0014\u0000QE\u0014\u0000QER��8tm\u001e�R�8��\u0016���3�ƀ<\u0007㇊�U�<z\r�����2���a����\u000f�\u0013W�\u0019\u0002�(#�յw,�������<�4�7�LI?ΰ��G��+>Ѹ�\u001d\u0007����)�#�"���[��\u0002��\'��({h�I\u0000�{�\u001d�T����^����}ߝ!��=\u0005&EN!��ד�]����K�\n��V���.\u0011�\u00012�\u0011�>e8�z\u0011ϭ0>��w�]��\u000f�K��-p��;\u0011��$\u0002~�\u0003]= \u0001T*�\u0014\f\u0000;R��\u0002�(�\u0002�(�\u0002�(�\bn� �����%��t1�\u001b\u000e\u0019H�\u0006�W������\u0017���<�$<�I�\u0007���־����\u0016����W�%Ŭ�RH�d05-\\\u000f��½/�O�K�\tI&���.�RrOW��U�\u0000k���/zɠ\'�y-�Y#vVS��pA��^�\u0007�k�\t���`7\u001c\u0016n#��8�\u0016�\u0000h~;�W���ƥP#܇\u0007�=\u000f֚\u0003�M\'W��m\u0004���\u0006�?ys�=\b�օ|����w�\u001d��^g0��rP\u001e��Ͻ}3��\u0015X���9auY��#z������ \u001b�QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000s\u001e3�k�]\u0010v���;\u001f#C!�\u0000Ы��c�\b#�7�/ހ�0�m�)�����H�ו`\b�\u001a\u0000u\u0014Q#\u0005\u0014Q#\u0005\u0014Q#\u0005\u0014Q#\u0005\u0014Q#\u0005\u0014V\u0017�5��υ5\rU�\r\fG�\u001e�x_ր<\u000b�ψF�㋵GͶ��d�\u001d\u000b���|~\u0002���C4�G�6\u0005i�3ȱ(��L��!\'�1��fء��\'�)j\u0000����d>�#⤖p�#\u001d?�V��3!��ߚ�Y2�}h\u0001���Gm�Uy��<M��p��\n�:G>a>�ٕ�ı\u0018ˣ�q�S��\u0000����ҥ�|\\0\u001f�\u001bc�>a���m��O�O.�\u0017=\u0015�~��\u0000C#\u001e��2�E�?\u0010Ydb��9��kc�\u0000g�y���\u001a�\'H�������W��\u001d�ʏ�-}IZG`\n(��\u0002�(�\u0002�(�\u0002�(�\u0002���v�m<1o��ؗP�2\u0000��`��h�P���\'j�Z���BZ\u001b0-c��9c�\u0000}\u0013�Rbg�N\u0002C������ [/\u0003��Wu\u001b��Ze�#��$��\u0000\u001dE��+P�\u0011�WW��7��/��\u000f\u0015)!�mJ�z�)�\u0007�Uv�\u0012pqBU\u0019�d\f�=*��!��y\u0011��j��\u0007�bi4\u000br���K��s�\u001aC�pF\u000f�&E"��$�}kO·�ٞ-���m�o"f?��\u0019�3YJ~a������s#\u001fvQU���Ӧ�Ϝ�����\u0001�\u0015�\u0005\u0014Q#\u0005\u0014Q#\u0005\u0014V~��i\u001aG��u;KS���eRG�<�\u0006�\u0015�7Ŀ\u0007� 된wX�.+_G�\u001e���_Jԭ������e���~T��g����F��\u0019\u0018\u0010�� ��\u0011^\u0013�\u000b�y/6��$\u00189y4�q�S\u0019�\u0000�O��^�E\r\\G³A%��\f�<R�\u0015tpT��\b=)��z����u��F�����-u#���5��\u0007\u001f�?_J����\u0017ռ%����[\u0018�\u001c� �%_�)�?ɬ�h\f��\f���\u0004\u001e��\t���÷��R6�A1�������MX��S�\u001cw���#���\u001d�k\u000f\u0014ءIT\\�2������\u0000�\u001d]|W��\u0010����5���\u0006�Pxq�\u0003�}GC����\t�\u0002��\u0016I\u001c�*]\u0001�\t����py� ���(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\f\u0015ۛ�\b�\u0010\u000f��r�����ᛯ��WI��-�L~�Fh�5ȳ���pN<�9[?�\u0003\\��mT�>\t�\u0007l�a<���\u0007r�\u0000㬣��\u000e��(�\u0002�)�ʊY�*���\u0005\u0000:�þ���4��l��ؙz��M���k��~6�;N���xڝ�\u001f,V�#\'݈\u0000\u000f=\u001e��O�>\u0017�%h���(�^��C0�\u0006M|��ϊ\u001e%�[<r]����kjJ�\u001f�\u001e����\\ƍ��>"�b�4�W������Gvc�Tz�\u0000����ǁ��h�^�\b8�Ѽj\u0016\u0000V�~&Ц�\u0013Ŭ�<Mі�\u000eZ��\u000e�\r�t�R��\u0017M�]\u0010\t����O�~�~�J�!�H�b\u0011�Zm��k�ɅW��&�i�sس�|C�����sr#�ml�?��c��\u001f���\u0001|emm�X��mi\f�l�s�����������M��\f�\b�����3�%���n�a�=�\u0006����e)tg�C\u0005G�^���\u0000�\u0011�WZd�S4�2�O\u0003i8��i�h����\u0000\u0001RGzﵟ\r\b\u0003M��2\u000eZ\u00169 �{�\rs-�S�\u0004zV*������a�\u0007��fO�W���#~`�G��qP��\u001c�U�w*\u0017i\u0002G\u0019w$ƃ\n��zVT���<c�\'�һ\u0013M\\��E�N/tE+�\u0019\u001dq�ִu�1\u0016�*\u0001��% \u001c����\u0000�UWNAs��DI���c��r�\u0017s��N훬���z�\u0010�6Q~����Tv�1�=�wR9�#\u0016��{+�mB"|�{��S\u001d�\u0001?����5>5x\u0010ƥ��V \u0012�e���}�����N\tՄn�����5�����T,\u000fp)�Џ�?�t�\u000b��-�\u0000���\u0000�4���|\u0005�\u0000A��\u0000�I����K���\u0000�\'���<��oʟ3\u0019�o�.�\u0001�\u0000�e�\u0000�\u0012o�&��]\u001e\u0003�\u0000���,��M|��y�Dߕ\u001fg��y?�G3\u0003�8�0x\u0016N��\u000f�����i>)x"N�"�\u001f�n\u001f�W�_f��y?�K�i�y2�4s�>�O��\r~�%�G�Ӂ��Z/\u0010h�"�Z���\f�\u0013.\b�\u001c����py������i�ʑ|�2y��\u0005}��:P�+�\\��v6�e��^[��\u0016�\u0005�NH\u0015�T����)�#��OrNMk#�_۬��)$g�9\u0007ЎƢ��\b�\u0003��6�Kg2��T����BT/����9�+������x��X�\rŤ6��\u001c�\u0010��\u0005�=:�\u0015��l�.\u0017�N)M��\u0010\n\u0000�hU\u0017=\u0015�#���*��\u0007�ڼ�)�\u0007\u0018�+\u001e`T�{P"��\u0018s��v�l\n�\b��ޡu\f>�\rAH�:�I�?�+|�\u0006�3ϥ"���\u001b��x��zU�$o�\u0015��s�Ȁ)��\u0000�"���c�G�(�\u0011y}\u0016��I�\\ǿdC%e^�g\u0003���=+�,>9�J��^}�O��D�n\u0003�\\֪H\u000fK��4�\u001b�_W\u0003�:���z!�+\u001f�\u000b`��!� �\u000fB;�\\\u0005�/\u0012��G𥨛S�\u000b#��#��\'�S�r�\u0010>)��g��t�\u0015ά\u0006\u001c��ݿ�ޭ����Z���kZ�O<�\\^L�4�w;\u001e�c�\u0002��¹�~,���j�<V���g�b�ȑ��?_�\u0015�Sk�$�\'�\u001aF9/!�I��K���}CV���\u0000�Wo��\'�-c\\�G�DH��/�|\t�۽Y48n^�-���\u0017�p2H�)j��Ϛ�֧RIePH�o\u0014�}N�)�{ut�O�$`�\u000fpG5�j�1�u�1\\�m\u001c\u0019Ȇ�\u0004�A����_,�\u0000\u0018��\u0014R�\u000eU$���Ge��Z���\rf��\u001bQ���eQ��\u000f��ױ�_\u0011�/�\u0005Ak��\f��\u0000,.v��s��\t��B!�)�\fg�*�d���Y]C#\u0006SЃ�k#��\u0018��Y�I�j��H�&7\u001f~&��{\u001f�k��]OS��m;R��#��3(�\rz/��6�ټv�#�]��)��BȣԯF�0~��q��O\u0016x^��\u001e ��o�Y\u000e��\u0003�c=\u0018�\u000eGj�F*k�_��i����/Y�xnsz�\r�g?##�\u0019������pC`��j�,.$\u0018�[�\u001e�u�^��;-�\u001f�?���\u0000�\u000b��uX�ȩ���?�jD����\u0002��k�\u001b\u0018���Vp��x?����^�_\u0015���ޛz�6��:\u001d�\u0000-Gv\u0003���?�W�M�.����hd�#�\u000b��41�\u001b��f8��s�\u00184\r3�eִ�RF�P�\u00023���;O��R�\t[}M���\u0002�2?\f�˫<R���}qgp�.\u0019L{��\u0007�ni�9�RU��N�m�[�3�\u0011�F=D��ߏ�Yʧ+�;ha=�o\u0019k��~9c�5�\'Y#a�e9\u0007��ׂZZO��گ�5���|�i�\u001c�u8\u001fu�����xO�ޝ��6z�\u000b\u001b�!V#t��y_���5b��V�\\��������(��8\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�k2��v\n�d�p\u0005U��f}���)���b\u000e������\u000b�ב#B���:�8\u0002����.�%��T�Ke��\u00169?��Q���\u0015m�\n�\'w�2��X�#\u0019>6����ڥ��"^\\�\u0018�C\u0003\u0007b\u0019����\u0012OҸ߇V�߅o�cu��%�����r��u�9\u0005�\u0001\u0004~B�[�iӰ���qz~�\u0001�|Au�id\u000f��\u0000��\u001aS�\\���C{�q�\u0000�ֱ����\u001a�&�\u0000�P\u0006LZ��>$�\u0015^�I��Ҭ|Cc-���i�Q�Y\u000eB�\u0000�:\u0003��փ��rF=�P\u001b)"l�G=�\u0003�o\u001f|\u001b��%{�%L����������W�}���y\u000e��>R�\u0010�1����D�dM\r�h���\u0006�\u0004{ןx��F��\u0007k���.�\u0006�eY\u0007�^\u001f�H>�\u0001�(�%�R2;�����>6��4Il�X#�����ޠ\u0000i\u001d\u0007\t\u001a�|�rI���o�λ�K m2����;�\u0003���e\\�����Ӯ4�\u00001$�)U\u000eD��\u0019YOq�s�\u0005D�ˡ�\u001d�TNj����o��2Ϩ�M#\u001c�{�\'�Զ�֭fكP�_f����k��OƬ,��\u001f��\u0013����C\u0017M�.[#����ڀ���0��\u001d��t�X�S�\\\u000f���\'��F?\u001eEy�����8L��\r\t�\rԥ-��K7v�\\�}m!�\u0016P+��\u0006��w\u0002�FV)�\t\u0003���zs\\�a����T���\u0011,�\u0017#ta�ӎ�Sm=Ȍ�|���~��Y=�k6Უ�5��Z�c�X�\u001f�˭a��\u0003����\u0003��\b8b\u001aj���#I����\u0003������8I7����G�1W��M6��\f\u0016(�� ��u�\u0011"x��´8�V�\u0003\u001c���\u0001��S�#��\u001d�U���1L\bb�˕T����\u000f��g|O$H��\u0018��S΄F�u^EW���D��}\u0003P\u0016\u001f\u0015���$mö{~5dݞ�~]*\u001b8�n\u0017��\u0000h.\u000f\u000b\u0012�~u��{`2�m������Z\u0004�L\\\f��\u0019�q\'�J����Ц\'�����?ғ˿�\u0000�z#!�X��\u0000�s#�QG�L}�����Q��Wa힇֬���c�2\u0001�\u001a���C�X�~-#r����\u0018�\u0017��#2D��\u0004��N����hE6�\u000b�Y\u0014\u001e��#��U���/�i.�w�\u001c���\r�*!�����<�Y\n���$8�"�A�T��|�f�C�\u0004$\u000f��s�\u000ery�O�z�4Iz\u001b�=��;#n/\u0010i�r�w\u001e:t�\t�Y�3\u001c�X������G�]1�\u0000����F�2\u0016yW#\u0004`sE�r��\u000eIl�S�����A/��~���\u0000d��>d�ߊq�\u000b�e���\u0014\\V!��(�o2\b�F\u001bH�r9\u0019+�x�КҸ��\u0014�/n��8��5�c�X���[G��~����:[;|c��\u0000��Sh"C�����Dc�X�~�)<�������P�\u000b\u0014�(��F�z\u0000sN���b�\u001d�`I�F(�\u0002\u0018y\u00188�\nD/\u0010�Lc\u001e�q#�$:.�0��fe<n��q�^�a�\u0007�:/����ҢX�\u0011mm3&\u001e1�\u0003��X{���5��\u0000���\u00174\u001b��`��=�9�(Z\u0005�R�kė�1��2�%��\u0006,ORy�V��\u001f�~\u0018��km.��HP���>�\u0010�\u0019\u0007\u001fZėt��\b��la�m�I$l:\u0015r1#X�\u0007��Uyi,��O\u001f��h�f��{/\u0000\u0013�5N}K[�m����^d,�h��AW�b7c��e�{\u0016l3\u0013�H�yC���Ҁ�zkH�\\�<$z���湨��#"�/�\u001c�X�U��9r�\u001d~V\u001d\b�(\u000b"�\n\u0006E���m�?�*T��\u0000\u0004oB�!��Qū�pq\u0016�r�G�n�$�+921�7ri�,[��Vm���*1�Ɗ?*��h~��?��#�`r%`}A����\b$Y"��\u001ct`Ԯ\u0016"�X{sl/%�K�10�Kv8\u001d�5\u0003�\u001c�:7ӏ����WP�����\u001e�����x\'�S�Q#X�T��\u0004\u001a�t`.����\' ԥ\u000bpy�)�B\u000f���\f�0d�RC\u000e�u\u0015�h��Ιq��s��4`g#�p;���z��>I\u0005{zք:сվ�\u0019e9\f\u0001\u001c�t+X�5�Z��r�Zh\tn��=���#�\u0000\u0012\u001e���~��kv�M�<�����-�Fm�j7o�F�������^�\u0004��K7�\f�\u001e�\\y\'\u0000���Oj�$Ս�JQ�4]����\u0017\u000f�C\u001d���,#=1Ԛ���\u001c������i��\u001e��k\u001dE,��-��6�;�\t6"a�\u0003����Qߌ�O\u0018\u001f-�l\u0007�=+�Te}\u000f���SQ��{\u001fC|"��ƭ\u0014�\u0016�)�{h��y\u001b�\u0018�\u0000�{������S��~\u000f��Aе��_Z֡��\u0000G�<Q2�/��\u0013�=6��ڽ��\u0016���\u0000�c��\u0000�r�5�N�*���\'Nu�*jɝ�\u0015ŏ�^\u0003=<Gk�\u0000|��\u0000\u0013SG�?�s\u001cE�A!�Hݿ�՜�]Es���A�7�u;/�����\u0000�*O�K�!��J�\u0000�\f��ր7(�#�O\r��֬���6�\u0000:U���ߧ�����1�h\u0003r�ζ״k���լ\'�\u0000�W(��ր ��\u000fҀ\u0016�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002�(�\u0002����\u0010\u0000��ږ�5�A���K��^7�9��1��\u0000\u0002fE�n�\r\u0018�^���\u0019ا0�݇f#�Ƕz\u000fBM]�%��<����I�K�G�M\u0000l��B� �6�\u0000��U�N����\r**��qտJx�c�\u001e�P\u0005�*�ڈ���������>��\u0005�*%�&�"�u ���h\u00027�\u001f�0}EU{nĜ}*t�������\u0016�zƮ\u000b\u000f¦ 0�\u0014\t���e\u001b\f0\u0007��\u0016���\u0013X����v�T��6\u000f\\\u001c\u0012+�t*py\u001e����ebn�����\u001bk�\u000e��{X��4�s\u001d�&�A� \u001ft��5�-���\u0005|u�k�1\b\u001c�汵\u000f\u0006xkUm��\u0016�;�\u0000}�Pߘ���/��\n�b�gƿ�2/\u0006݇�i�py���j��o��\t��t`���"�Ѫ��\u0005|\u0013\'���\u0014�t�\u0000�K����u��.��\u000f\u001eK�B�A�)�~��?ޯ]������\u001d�u�5�SZ�&\'�z8.\u0014�\u0019\u0007��=�W��)&rz�u>�\u0005G\u001f�N�_�=\u0013B��|Mu�\u001dgPM<D�dn\u001dCHr>L�\u0018�Mz\r���\u000bL���M���rk�,�ƪ�[�B�u<�\u0014q\u0005��N\u0007����\u001e\u001d�}\u001bC���P�gn���>m�\u0019�i\u0014���*֝i��wl�\u0013࿅�\n����m�\tT\u0002}zT��G��\u0010ɩ�z��\u0003�Z�u�O��\u0000*�9%g\u0000?\u001d�L��h�\t�1\u001f?b�s����*k��~\u000b��id�%u^\u0000k�\tf<\u0005\u001c�$W�V\\�/5�" \u0018���`��T��\u001c��8�~\u0015�f\u0018~\u000e[�)\u0007y%�\u0019�\u0001=\u0007AVb�}��\u0014C�F\u0017�C }zסQ#\u001c0���\r�غ(��Q�\nx��K���髶��8���\u000f���4���^���\u0000�m]�-\u0000pG�V��OŚ��\u001b�\u001f����\u0000>��с�#\u001ex�\u001a�o�~!?¡o\t���\u0014o�`ף���E?QQ���u�?*\u0000�W�f��\u001bks�\u0000l��\u0000Z�/�t�\u001f��\u000f=�0�Pm6ٿ�\u001fCP��\u001fb��\u0006�<�_��S\u0012E���%�P��m���]\'І�����\u001f��~"�tɗ�U���<>��k/���\u0007�x��?�e���U\u00190Om7���k��ї�+/�T/d�}�ѹ\u000f��|\u0015�[\f��e\u001dԌ~������^g�����k鳦Ŝ�(O�X�Uitp��O?Ā��\u0007��M\u001f1�\\��\u001fBy�1\u000f�7N��-�����y��T\f�G�k���u�>H�kS껂��#��t+\u001e?�{!���Ryq�\u0000\u0014?�ˑ^�u��R��\u001a�9<��\u0002NJ���^�c�l��;���\u000e(�z���lz���\u0003Q�+f8\u0017a}�2*Y��ٶ�A$M�"��u\u0018J4\rG\r\u0019��)��>�L}\u000e�z#H� ���ic�%�~��\u001a\u0001JM:�?�m*�P�\r\u000b/\f�}A��\u001dZ�>�n�fPj�k��\u0013�E\'�\u000f\'���s���ȣ�#ֻ!y�O�\u0000\u001f\u0016\u00062{�\u0007�\u0015*��\u0005���U\t��o�i43��Â\u0001��(�\t���\u0000�X��O�m��\u001b�\u001fP\r#�\u000b�\u00031�\u0013�r(\u0003�\u0016��զO��\u0014����\u001d�\f}\u001f*k��º�y?g\u000f��\u0003T�Ѯ����\u001fU4�#;�\u0016�\u0000\u0019�\u0001(���Ui-g��X%���5�-\u001e#�܍�\t\u0015f+�F�a.���_\f?Z,\u0017G>0z0?J\n��鎦%��J���ٰ�Ɠo�.?��_Y1�\u0013\u0007_ʕ�s����h�\u0014�Eu\u0003�z}�:�-�v��|���Cs��v�w���\'��pߎ(\u0003�\t\u0011��=��ż\r�\u0000-��N?J�{[�f�q\u0004�7��V�\u0002�\u001c�k���hd�\r�M}&�FM��c�����8����\u000eb���\u0006�A\u0019�o$d��ן�R)�Vk��\\�N$\u0011L��*�j�L�^� z�x4Y\f�\f\u0003=(�G�>��G�xj��+�����m�u+�\u0018ʻ�/�q�#9��\u0003�P��I����1�\b5�\u0010[�-u�F!藒\'����\u0005����$�\u001f�ܟ²�4��l�֒�=W�5�~#|#�P"���G���(�\u0000ǁ����3��n��x;��\u0002���+�Ux��̸�52�H8�4�{�\u001fր=:�㕴�\u001a�����Z\u0006\u0003�u5���\u0017>\u001fM�M�K�9��aFQ��?�xz�\u0000e�İI\u0003\u001f�C�J�\u001a\\\f�_E\'�/\n�Ӛ_��\u0013�������ۤr^K\u000b�,ºȗύd��f��1�\u001c~d\u001c����w����Ve�_�S��R�L�d���m$S��fL~\u0000 i��\n\u0002Ϝ\u000e�����)7AF�(��H \u001f�_1�\u001f\u0018<c�\u0005F�R�5�\u001bȃ��a��k��>?#�SY�%�w��#�{�l\u001fȚ\u0000��.n�\r�����\u001f�\u0015\u000bj�\u0019��]{����\u0000B��Y\u001a/�O\n��V�W�f#�E���\'�\u001b\u0019?L�B�\u0010\u0019�\n�u#�)\u001f\u0010��}$�{�\u0003�?21S��iwR\b��m$��E�K\u001f�9�\u00040J2�~\u0006��|;a|�n,��\u0007�zD\t��\u0000mQ\\��2X�>���#�Q%%\u0007�\u001b+�U��5k~%�=��3���O�\u0004P\u0006�\u0015�\u0006���n-���\u0000x����s��\u0015�\u001c�*\u0007����e9\u0014\u0000�(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\n(��\nᤕ��i�N��v�\u001b(��\u000b�9��Q�\u0000\u0001�渐\u0002^�?_2�Wϯ́�\u0001#\u001ah�\u0000/=iAb�\n�\u0011��kB\u0018�u=(\u0000�2�5i!�\u0015$1\u00003V�P\u0005#\u001e��D�\u0002�\u0019\u0006*����4\u0001U��ɨL�n�JY�;�d��$g�\u0000jC2I2�eEb8�S_Y�=��k��\u0018\u0005N\u000e+˼O�+�\u001fQ\u0012�b�\u0019\u0014eN�P���\u000f��Sh^1յ\u0014�e�=�g\u0019��y�g\u0019�\u0002���E�i���9��G6���Њ�4]zK�>+���~�\t�#�?*�����L��W�����\u0012�\u0003�\u000fb8?�_��]������U!}�&͡��\u000f��\u0014\u0001��,w1\u0006^A�=*E\u0018��KmE��ާ�ⷭ�;y���>��/g\u001dzTOs\ngt���sP̞yܲ�_���Tx]G*GҀ->�n��\u001f��I�Ek\u0002�c���\u0007��)ԀMsz�\u001d�\u0001�\fo�>7���V������#\n�\\`\u0010��\u001f�|�G<��b�4�����3��A�qIᏃ�=�\\�SE%�6V�\f����z\u000fa#\u0012�\u001f��D�ė�C8+e\u001b\u000eB�\u001aOǠ�M{d\u0007j�T\u0016�p�5UP�#\u0000\u0001���\u0002���\u0005\u0000858HG94y\'�\u001eI��\u0000���(����棵�u��N\ty���P\u0017�ȟƘSg�FB��z��Em\u001b-� ��\u0001��\u000f?ր4>��\u0000��T�mU���\u000e)�0�\u000b�\u0000koU������\'�����Y���wku\u0014p\u0018�6fB�Y�\'\u0019Q��}�6��\u001aM�#�\u0017M�է��U�k��u\'�-��5�!��0l�������\u001d�Z��քh��\u001d\rH�\u0018�~�A\t�Q��\u0014���(�\u0002�(�\u0002�\u0014�P\u0001Q4\u00117%\u0006}#�h�\n�d���>��\u000fhG���+#�w�\u00194\u0001�m���*������U�\b�֡kpz\u001cP\u0007;q��8"H���3�ΨK����<����ǰ9\u0003�\u0015�Ilz����o�M\u0000q7z;ȥ%��u<bxq��O?�r��������&�s�v�+~�/�\u0001�W{n1��%��A��\u0000x=��ǎM�:�e��a�C\u000b��\u000f�\\����oI_2�M�a�\u0013"�C�\u0000\u0002\u001cW��XnFF\u0001��R2\u000f�Vkh�D������L\u000eS#�\u0003�\u0000��%\u00078=:�T���۵?\bX�9k�+Y��z4~S�\u0000�q��\u0000A?Z��\u000f�h2�7�Z��\\��\u001f�����I��\u0015�\u0019^�\u0004\u001fJ�}�MwM\f��\u0019�^�Z��G�\u000eGЌ�Jˆ�O#�=)�&�\b���7d�\u0000u��\bu[�H\tr�=$\u0001�\u0019%���Zb����k��\u0000[o\u001b��\u0015�\u0018�Mh�K\u001c��\u0000��\u001f��E\\\u001a�[�h��v���7�\u0003m!=�3�4�4\r*q�\u0000_�\u000e+�*��(8�\u0015,o4\u001f�n&��\\���a�Mټ!f��;��\u0019���"��L��b�5}N!���=$_�*a�9�\u0013Y��\u001b\u0003F�dc����\u0004+TQ�ڕ�f�i���\u0000�r\u0015�:V����>q*��\u0011�,ߤ���p�]5�~\u0015�r�^��n"\u0019?��d������tIl��\u0000�KV����U����J�=j��\u0019?�\u000f�E��xoK��i:�R\u001f��7\f=�Jͼ���e�%�u\u001f�\u0017�?JK�2\u0019\u001br���\u0007��4���Ł\u0002���\u0007��w\nC�3v���GPh�{\n�\u0005�z�x�l�/�\u0000=\u0014`�}��\u0014c}�����Q�Ӱ�c��\u0015,2�n۠�H�b�EJb��t�\u0017F���5�\\\u0003*N����En[x�)\u0006��\u0002=J\u001d���7e4���Q��4��\u000f�,��\r����\u000fN�K��:����\\!L����\u0016�g6�R��\u001b�ʀ/�x>�ԝ�+�ݫ\u0012m:{v�!R;������mGn&�/�`�y�e�\u001d���ӑLL͇V�,�Y���d\u0019�z������.�d����F^�N&O�p}ꔐ\u001f����7\u000e�kt�f�~\u000f�\u0012\u001c��k6�����\u0000�Bʹ��*\u001a�"�6܅���+V�V��l����F�p*��\u000ep}2+{E�Lj�<W�/W��1�\u0000,]�ȏ���\u001f�+&�m\'\u0006H�ɓ�\u001d\u000f�Y��u�$�j��;\f�^!�����9�~�6?�שh\u001e1ѼF��u�.�\f�\fvʿTl\u001eƾ>i\u000f�\u000b;$�"3,�r��\f�B9\u0014\f��o~m�&�;T�ɗ�\'�C_/xk�?�4UX/�Mf�q����\u000fi\u00079��^��o�\u001e\u001b�[,\u0016w�d�n>�xB9?��F�\u000eh\u0003���7�\u0001�zƞ����uvH%`�b�\u0018ߢ䎪I��pq�Z�<�v� ��T�\b����A�ȥHϯ�\u0000Q���ٱ8���\u0001\\C�V�7\u0011O���#�<\u0011�Uk#.�bw9p\n��2�v��L��[\u0012�r\u0012\b����#\u001atVb^�\u0001�2��w\u0018\r�\u0007��j�\u0017\u0011\\�h�0\u0007\u0004t �\u0011�P\u0004�QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000\u0014QE\u0000Awp��Sܰ��\u001bHG�\u0019�?Ӯ%��\u0014��|�\u0001$�\u0000\u0017R\u000f�Mv>$`<=v\t��P�\u0019�?θ\u000by�^z\u001c�4\u0001�Ap\u0002������j�1�v\u0002��8�Ys�0}��X�爴�\u001e0���P\u0016�\u0006?3}\u0007Z\u0000�b�E��\u0015Ԩ��]\u0005��7Q\t"p��\u0006�&��:\u001e�7�k��ғ�>P��q��4}j]6�0$�O̾��=\\���2���+��-�h�\u0015a��\\l>�\u0001�r\u0006\u001a��\'y����\f\u0007�b\\�,y�#\u001c����|��Cq�5[H�"�a�mv�ȧ\u0006)3�=F+n�y5H���\u0000I}q6�b�7~\\����ܟ����R��oag\u001d��K\u00141�*/A�\u001a�\u000f���\u00064\u0001��\u001e�*�GF�k-d#�J�b���[���J���:��c���Y�&{w�S%��H\u000b3���\u000f�c{�\\���\u0019�R�\nrppjk��\u0015�-���:\u0000�Ю�\u0000\r%�\u0003�9�v�����\u0007̜wZ��m�j0+M#�\u000e�/����\t���-����?F�$�р?��\u0001�\u0005C�\u001f����p�,��du�\u0013V\u0013Q�N�/�3�\u0000���o�H��8\u0011�>���1��G�8\u0018�;W,5�Ē \\?%���1�j�x�a��F�\u001cP\u0006��v\u0014�\b��f��#?~�����]zɾ��Ϫ�\u0005�\b�\\/�M\\��X\u0018���Y\u000b�����pqՎH\u0000\u000f�j�\u0017S����>�\u0005����\b��Y\u0004M�\n�\b�G4���8�;���v�Ϧ�ar\u0007��y�䟙�>dc=J\u001e\u000f�z\u0010k�Q��\u0016z.���,�v�\u001bI�oE\u001e�?�p3���Y�څ�\u001c���O\u0010,B����\u0005\u0001F\u0005Ak\u0010�<��ܟoj�L�h��\u0000(���\u0000Z(��\ni8��\u0014���0�ր\u0000;���a�\u0007�\ni�<}��\u0014\u0001-\u0015\u0017�\u001f�\u001f�82�B\r\u0000>�cS�S�\u0000\u0012O\u0003�r���/\rh!�Π�H�R\u001f������\u0007D�����\u0007�\u0007�J�]K���3&��\u0019}\u000b1l�\u0003�ֱ��?\u0017_7�\u001e����UF?<�\u0007�����Z��\n�8�u�\u0012當�_f�\u001f�jv���KT/6��\u0011��6Ҥ��3#\u001e�����=��Ҽ�~7�ZM�jZl��>�Ko��ץni�\u0000\u00194+�\u000b:\b����:Yt�fߴ\u0006\u001d\u0018\u0012\b�\u0011��+\u0013T𭆤1ye\u0005�`̻\\}\u0019p\u000fη��Q��X\u0010�"��\u00165��$���\\z��\u0000xΥ��5,�e���\r�̿���Er:���hcu���\u000ex�>x��\u00042?:�2[.�:��{E���\u001e�\u0018\u000e��GCF����s\u0002\u0001\u0004`�\u001d�\u0000\u001a�&��T�\u000f���B\t$��\u001bK�\t\u0013��E\'գ\u0000��\u0000�לk\u001e\u0013״\u0018�{�X��\u001f��j�H���e?�C��qX�e\u001e���VOz�[��#�\u0007�\u0004�\u0000�H�R\u000f�N��?�N�,Ѱ\u001cz�T���E����/���\u0000�<^�{F?3#��"\u0001��4=UO�T��/������z_�K���O��\u0002i�41�E�\u00054�\u0011�\u0001Q��z��\u0014Q�\u001f����#\u0012}�#����\u0016p����\u000f�ݤn���)�s�do��\u0002�7��8\u0015\u001b�{�<�����\u0000|��SY�&�"h�zS\n\u000fJ���#�K�\u0014�s̍�\u000f��,3`#�M1�T��\u0000m�
Above is just part of image data.
Here is an example code
path = '/home/fileName.jpeg'
var fd = fs.openSync(path, 'w');
fs.write(fd, body, 0, body.length, 0, function(err, written) {
if (err) {
console.log('error ' + err);
}
console.log(written);
});
I can't get my head around image processing in node js. Sadly AND gladly this will be an important part of my application.
What I am trying to achieve is the following:
1) User updloads an image (=> multipart formdata gets send to the server containing all data. This works great)
2) Resize that picture to a max width of 640px.
3) Crop that picture from Y-axis: some_variable to Y-axis some_variable + max_height (240) and X-axis: 0 to X-axis 640px
4) Save it like that on the server.
Here is my current miserable approach with multer and lwip
Example picture data:
Files { fieldname: 'picture_data',
originalname: 'dog-how-to-select-your-new-best-friend-thinkstock99062463.jpg',
encoding: '7bit',
mimetype: 'image/jpeg',
destination: 'public/imgs/',
filename: '1-picture_data-1453136557949.jpg',
path: 'public/imgs/1-picture_data-1453136557949.jpg',
size: 1790149 }
This data gets received by my router in this function:
router.post('/someCall', upload.single('picture_data'), function(req, response) {
...
});
Now the multer upload function gets called:
var multer = require('multer');
var storage = multer.diskStorage({
destination: function (req, file, cb) {
cb(null, 'public/imgs/');
},
filename: function (req, file, cb) {
// CHECK IF FILE IS TOO BIG
var fileSize = file.size;
File_controller.checkFeedPostFileSize(fileSize, function(err, res){
if(res == "File size ok"){
var mimeType = file.mimetype;
File_controller.checkMimeTypeImage(mimeType, function(err, res){
// FILE IS OK AND MAY BE SAVED.
if(res == "Mimetype ok"){
var ending = ".jpg";
if(mimeType == "image/jpeg"){
ending = ".jpg";
}else if(mimeType = "image/png"){
ending = ".png";
}
var filename = req.session.user.id + "-" + file.fieldname + '-' + Date.now() + ending;
req.session.user.file_name = filename;
cb(null, filename);
var path = 'public/imgs/' + req.session.user.filename;
lwip.open(path, function(err, image){
if (err) return console.log("LWIP BILD NICHT GEFUNDEN", err);
image.resize(640, function(){
});
});
}else{
//response.send("Error: Mimetype not ok");
}
});
}else{
//response.send("Error: File size too big");
}
});
}
});
Now that approach works until the lwip part. Which means the file gets saved to the server in its original upload size. As far as I understand the module lwip should now open the image from the server then resize it and save it again.
This approach is pretty awkward and I am sure it can be done right on the way before saving and reopening the file. But if you help me to get it to work in any way I'd be super thankful.
If any information is missing to solve this problem please let me know. I will not hesitate to include everything necessary.
Thank you
You should open the image in your router handler, which will be called once the file exists on the file system. Both options on diskStorage are called prior to the file being fully uploaded. Remove the lwip part from filename, and try something along the lines of this instead:
router.post('/someCall', upload.single('picture_data'), function(req, response) {
lwip.open(req.file.path, function(err, image){
image.batch()
.resize(640)
.writeFile('output.jpg', function(err){
if (err){
response.status(400).send({ error: err.toString() });
}
else {
response.status(200).end();
}
}
);
});
});
I am having a very hard time with this. If I had an external image url. For example, this is a picture url from IMDb.com, http://ia.media-imdb.com/images/M/MV5BMTMyMzA5ODIzMV5BMl5BanBnXkFtZTcwNzE2NDM1Mw##._V1_SY317_CR52,0,214,317_.jpg. How would I be able to send this image to the client?
currently, I'm doing:
res.write('<img src="/http://ia.media-imdb.com/images/M/MV5BMTMyMzA5ODIzMV5BMl5BanBnXkFtZTcwNzE2NDM1Mw##._V1_SY317_CR52,0,214,317_.jpg"></img>');
But it's not showing, I'm just getting a broken image.
UPDATE:
I ended up doing this to make this work:
var url = http://ia.media-imdb.com/images/M/MV5BMTMyMzA5ODIzMV5BMl5BanBnXkFtZTcwNzE2NDM1Mw##._V1_SY317_CR52,0,214,317_.jpg;
var loadBase64Image = function (url, callback) {
var request = require('request');
request({url: url, encoding: null}, function (err, res, body) {
if (!err && res.statusCode == 200) {
var base64prefix = 'data:' + res.headers['content-type'] + ';base64,'
, image = body.toString('base64');
if (typeof callback == 'function') {
callback(image, base64prefix);
}
} else {
throw new Error('Can not download image');
}
});
};
loadBase64Image(imageUrl, function (image, prefix) {
res.write('<img src="' + prefix + image + '"/>');
});
IMDB returns a 403 (Forbidden) HTTP status for that image URL. My guess is that IMDB is blocking the image based on the referrer for the request. This is often used to prevent deep-linking to resources so one web site can't "steal" bandwidth/content from other sites. Even this JSFiddle shows a broken image, but loading the image URL directly in the browser works.
<img src="http://ia.media-imdb.com/images/M/MV5BMTMyMzA5ODIzMV5BMl5BanBnXkFtZTcwNzE2NDM1Mw##._V1_SY317_CR52,0,214,317_.jpg"/>
The solution would be to not use IMDB images, which they're not making available for public linking.
Try this:
res.write('<img src="http://ia.media-imdb.com/images/M/MV5BMTMyMzA5ODIzMV5BMl5BanBnXkFtZTcwNzE2NDM1Mw##._V1_SY317_CR52,0,214,317_.jpg">');
Image tags are self closing. There is no closing tag.
I'm making an express application, and am having trouble exporting a file when the user clicks "download".
My approach as to make an ajax request to the server with the content, and then on the server, create the file and send back the file path. From there, I adjust the src attribute of an iframe element with the file path.
But, nothing is happening on Chrome (or any browser, actually). If I look at the network tab of the inspector, it shows that it received the file OK (with a 200 response code), and the content is there. Also, the iframe has the correct src. I'd like a download dialog to popup, but can't seem to get it.
Any ideas? Thank you!
Example Code:
app.js (server)
app.post('/create-html', function(req, res) {
// explicitly set the headers on the server
res.header('Content-Type', 'application/octet-stream');
res.header('Content-Disposition', 'attachment; filename="test.html"')
var html = req.body.content
, name = "test.html"
, filepath = (__dirname + "/public/files/" + name)
, json_resp = {
data: ''
, err: false
};
fs.writeFile( filepath, html, 'utf8', function(err, data) {
// write the file and res.send the json_resp, so we can
// access the filename on the client
})
})
script.js (client)
$("#export-html").click( function(e) {
e.preventDefault();
var html = $("#html-wrapper").html(); // the html of the file we want to make
$.ajax({
method: "POST"
, url: "/create-html"
, headers: {
"Content-Disposition": 'attachment; filename="test.html"'
}
, type: "JSON"
, success: function(resp) {
var iframe = document.getElementById("iframe")
, fp_prefix = "/files/"
, fp = fp_prefix + resp.data; // ex: "/files/test.html" - the path where the file can be accessed
iframe.src = fp
}
})
})
I'm getting 200s when POSTing to the server (/create-html), and when the server is sending the data back (test.html). The content of the test.html file shows up in the web inspector, and going to /files/test.html shows the page. But, I can't get it to download the HTML.
Any ideas?
with ExpressJS you use this:
apt.get('/create-html', function (req, res) {
var name = "test.html"
, filepath = (__dirname + "/public/files/" + name);
res.download(filepath, name);
});