Files external object

Unofficial Content
This documentation is valid for:

The Files external object enables you to programmatically select files from your device to be assigned to Blob and BlobFile attributes and variables.

FileExternalObject

Properties

It does not have any.

Methods

ChooseFile method

Selects a file from the device.

Return value  BlobFile
Parameters [ acceptedTypes:VarChar data type ]


The method will display the available sources in the device to select a file. In the case of iOS applications, these sources will be:

  • Local file (files in the application's sandbox)
  • Files application (introduced from iOS 11)
  • Image gallery

IOSFileSources

With the optional acceptedTypes parameter, the required file types can be indicated in two ways:

  • Media type indication. i.e. "image/*" to indicate that only images files can be selected.
  • File extension (without the dot). i.e. "png"

A comma separated list of these components is also accepted to indicate more that one criteria.

Note: as of GeneXus 16 Upgrade 7 this parameter is ignored. Support will be added in a future upgrade.

Events

It does not have any

Example

Event 'SelectFile'
  Composite
    &BlobFile = Files.ChooseFile()
    SaveFile(&BlobFile)
  EndComposite
EndEvent

Scope

Platforms  Smart Devices (iOS)

Availability

This external object is available as of GeneXus 16 Upgrade 7.