Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
How do I use the LoadBinary Service of FileRepository TT to convert a pdf file in my SystemRepository to array/stream of bytes and assign it to a blob type property of a separate Thing.
Currently, If I'm running the LoadBinary service with the file path as input in the Composer for the SystemRepository Thing, nothing is returned by the service.
Solved! Go to Solution.
Hi @ravi2.
In our testing, we were able to load a .pdf to a blob successfully. We received a "No result" but were then able to validate that the object did exist in the blob. Is this possibly what is happening in your case?
// Content: BLOB
var Content = Things["SystemRepository"].LoadBinary({
path: "/FILE_NAME_HERE.pdf" /* STRING */
});
me.MyBlobProperty = Content;
Another possibility could be the path. Are you using the relative path for your System Repository?
Regards.
--Sharon
Hi @ravi2.
In our testing, we were able to load a .pdf to a blob successfully. We received a "No result" but were then able to validate that the object did exist in the blob. Is this possibly what is happening in your case?
// Content: BLOB
var Content = Things["SystemRepository"].LoadBinary({
path: "/FILE_NAME_HERE.pdf" /* STRING */
});
me.MyBlobProperty = Content;
Another possibility could be the path. Are you using the relative path for your System Repository?
Regards.
--Sharon