Stream .File Binary
I tried to get a image from user . But It did not run. So please solve this problem
Class Quadramed.Chennai Extends %Persistent
{
Property Image As %Stream.FileBinary(LOCATION = "C:/Images");
Method imagefile()
{
s obj = ##class(Sam.binary).%New()
r "enter your name",img
d obj.Image.Write(img)
s status = obj.%Save()
}
Should the user enter the path to the existing image?
Existing image as offline or online :? plz give example of any path of sample.
This method links stream object to an existing file:
1. Notice what Eduard wrote:
set st = obj.Image.LinkToFile(img)
2. Your class is:
Class Quadramed.Chennai Extends %Persistent
and in your imageFile method you have:
s obj = ##class(Sam.binary).%New()
maybe this is your problem?
Please give one example program of Stream file Binaryand images are store and retrieve these program. I confused this topics.