Blobfile data type - Draft

Unofficial Content

Scenario

New GeneXus Datatype to Store files in the Database with External storage support

It is highly recommended to use this new data type instead of Blob data type.

Properties

 

public property FileName  : Character

Gets the File Name
public property FileType :  Character

Gets the File Type

 

public property FileURI : Character

Sets/Gets the FileURI

Set:

You can set a relative path. It will be resolved with the current host.

You can set local path by using file:// protocol

When you set the URI property the internal Blob with the file will be set to empty.

So for example:

				//

&file.FromURL(myFileWillbeErasedInNextLine)

&file.FileURI = "http://www.myfiles/file.pdf"

In this case the file.pdf will be the file in the data.

Get:

It always returns the absolute URI to the file

Public Methods

public method FromURL(FileURL)

Load the current instance with the file given in the parameter FileURL.

This indicates that the internal Blob holding the file must to be loaded from the FileURL indicated.

After calling this method the URI property has the filename and extension of the FileURL specified.

For example:

					//
&file.FromURL('www.myfiles.com/myfile.exe')

msg(&file.FileURI)  // will print myfile.exe
public method SetEmpty/IsEmpty  

 

Availability

As of August 2017, this feature is in an experimental phase in GeneXus 16 (Tero).