Given your use case, I recommend storing the images in a File Repository. File Repository's have a Service, GetFileListingWithLinks(), that can be used to retrieve a link to the image. Retrieval of the image is done through a Service call. For example,
Thanks for the advise. I think that is a good idea to use the GetFileListingwithLinks.
As I need to log the entry record of every image transferred from machine to ThingWorx, and apply filter to limit the date range of records using DateTime picker, I think I will use the DataStream for this purpose.
My further question is, how do I extract the LINK from GetFileListingwithLinks() -- Assume a single record returned using namemask, and copy that link and insert it to the DataStream record (together with other field defined in the datastream's datashape)? Any sample snippet for reference in this case?
After the file transfer is complete, you can retrieve the link and add a Stream entry using the following:
var image = Things["SystemRepository"].GetFileListingWithLinks().downloadLink;
var values = me.CreateValues();
values.name = nameMask;
values.url = image;
Of course, this method assumes a single record is returned by GetFileListingWithLinks().