How can i send File instead of binary

Anything concerning integration via the REST API
Post Reply
rgalazb
Posts: 1
Joined: Mon Nov 09, 2020 5:02 pm

How can i send File instead of binary

Post by rgalazb »

I'm creating my own react web client for Mayan, and when I'm trying to download a pdf to show a preview on the browser, I get a string like this.

%PDF-1.7
4 0 obj
(Identity)
endobj
5 0 obj
(Adobe)
endobj
8 0 obj
<<
/Filter /FlateDecode
/Length 54622
/Length1 239828
/Type /Stream
>>
stream
x��}@UU�����:���<�
�5����>0MP PԬ&���5�TӔ5��WMc�!���r�^�Ӳ�a��m��^S����>�^�F�4���O��:����g?�Z{����x�E�(�RP>}j̄�I$_��o�ZPXt������D�é�K�/���Fbߴ�ej��)�v��a��%U�Z\Q>�2ߙI�����biyV��i'�_a�����m{�.F��=�`ւ�#�o :#�(��e+�[�?��,b�K$�-[ݮ-~q�G�~u;�uG]��+��#v�䗞]��Ba�@��>�qm]�g�‘�ݺ�($��f��f�K�J��}������=p�\�ǯGApvЭ�oG>�~e



anyone could give and advice to render the file through the web browser and get the file instead of this string?
User avatar
rosarior
Developer
Developer
Posts: 596
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico
Contact:

Re: How can i send File instead of binary

Post by rosarior »

The string is the actual file you are requesting. Check the encoding of the request in your client to make sure you are requesting it in binary form and not ASCII/text/UTF form.
Post Reply