on 06-15-2015 1:17 PM
Hello,
I was wondering maybe you guys can help solve a problem regarding with sending base 64 encoded messages via web-service.
As mentioned, I am trying to upload base 64 encoded messages to backend. In the frontend, the javascript encoder seems to be working just fine (I checked the encoded results with the result of one of the online encoders. The result was the same. So - the file gets correctly encoded.)
But when I check the result received with the web-service, then the import parameter is faulty with only having about 1/4 of the correct code and the rest is something else. Maybe it has something to do with the type 'string' I am using (not long enough?) ?
Here's some graphical examples :
1. The encoded (and correct result from javascript, NOTE : the red mark illustrates the point where something goes wrong in the web-service result) :
2. The faulty result I got in the debugger mode :
Hope you can help,
Thanks,
Mario.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I got the Base64 solution running. The abap debugger showed the base64 variable shorter than it was, but now i realised, that all the characters were actually still there. So there was no problem uploading the file. I managed to get the download function (from javascript web page) working as well, where I used atob and blob. I tried the solution with documents up to 10mb and there hasn't been any problem so far.
Ekansh - Yes, I tried the more common approach You suggested, with directly sending files with the 'media' type Web-service, but I got lost with coding in the _DPC classes and the base64 solution seemed easier (at that moment ).
Thank You for Your help!
Greetings,
Mario.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.