Assemble chunked api doesn't work properly

I can upload my chunks with chunk api but when i want to assemble the chunks with its api , for example a doument file with photos , its photos get damaged and it seems like the assemble api doesn’t work properly .
Is there any suggestions?