Scenario:
External webpage needs to send files (pdf, jpg, docx etc) to NAV.
I've created a table with some fields to hold the files names, extensions etc - And a BLOB-field for the file itself - in NAV.
My problem:
I need a webservice, that can input these different files into my new NAV table. I've tried creating a page with the BLOB field on it, and publishing it as a SOAP webservice, but that didn't work: The webpages developer can "see" all fields BUT the Blob field at his end.. :-(
Any suggestions on how to accomplish this?
0
Answers
Name DataType Subtype Length
Bytes DotNet System.Array.'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
Convert DotNet System.Convert.'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
MemoryStream DotNet System.IO.MemoryStream.'mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'
MyEndpoint(newdataset : BigText) : Boolean
IF newdataset.LENGTH > 0 THEN BEGIN
Bytes := Convert.FromBase64String(newdataset);
MemoryStream := MemoryStream.MemoryStream(Bytes);
TempBlob.Blob.CREATEOUTSTREAM(OutStr);
MemoryStream.WriteTo(OutStr);
MyTable.init;
MyTable.blob := TempBlob.Blob;
MyTable.insert(true);
EXIT(TRUE);
END;
https://rockwithnav.wordpress.com/2017/06/30/file-to-byte-conversion-client-to-server-move/
Blog - rockwithnav.wordpress.com/
Twitter - https://twitter.com/RockwithNav
Facebook - https://facebook.com/rockwithnav/