Hi,
i work with the Gemstone version of Pier 2.0.
I use PRFile to save data into OODB but
i'm interested to save some Files directly into directory on the server.
For this i create a subclass of PRFile named PRFileOnDisk.
In this class i define the method:
isAbstract ^false
label: ^ 'FIle on disk'.
The fileModel class method return:
^ ISTMAExternalFileModel
and the descriptionFile is set to:
^ MAFileDescription new
kind: ISTMAExternalFileModel;
accessor: #file;
priority: 300;
label: 'File on Disk';
beEditable;
yourself
The ISTMAExternalFileModel is a subclass of MAExternalFileModel
and it work fine ( create directory and save data on the server disk ) for other
Magritte description based on MAFileDescription ( with kind set to ISTMAExternalFileModel
).
Now when in Pier i define a link with Type: 'File on disk' ( based on
PRFileOnDisk )
the system create the subdirectory on the server disk but don't save the file on it .
The file is managed how MAMemoryFileModel.
Any idea about it ?
Thanks,
Dario