Using URLs in PROPATH in WebClient for image file downloads
- Last Updated: August 28, 2019
- 2 minute read
- OpenEdge
- Version 13.0
- Documentation
There can be URLs in the PROPATH environment variable
of a WebClient client. If there are, and the client executes the SEARCH
function or the LOAD-IMAGE( ) method, the URL
pathnames are processed along with the other pathnames included in the PROPATH.
This feature lets the application access files, especially image files, over the Web.
Using the SEARCH function
SEARCH
function:SEARCH ( opsys-file )The SEARCH function searches the
directories and libraries (including URL pathnames) appearing in the PROPATH environment variable for opsys-file.
The SEARCH function returns the full pathname of the file
unless it resides in the current working directory. If the SEARCH
function does not find the file for any reason, it returns the Unknown value (?).
If the file is found in a directory specified by a URL, SEARCH returns the full URL pathname of the file, which consists
of the URL's PROPATH entry with the filename appended.
If opsys-file is a fully qualified URL
or a fully qualified pathname, SEARCH checks for the
existence directly, and does not search the directories and URLs in the PROPATH.
SEARCH does not download any files.Using the LOAD-IMAGE( ) method
LOAD-IMAGE( )
method:LOAD-IMAGE ( filename
[ ,
x-offset ,
y-offset ,
width ,
height
]
)The LOAD-IMAGE( ) method applies to images
and buttons. LOAD-IMAGE( ) reads the image contained in
filename. LOAD-IMAGE( ) recognizes PROPATH entries
consisting of URLs. If LOAD-IMAGE( ) finds an image in the
directory specified by a URL, LOAD-IMAGE( ) downloads the
image from the Web server and loads it into local memory directly, bypassing the end user's
disk.
If the filename argument is fully
qualified (whether URL or local pathname), LOAD-IMAGE( )
loads the image file directly, without searching directories or URLs in PROPATH.
If LOAD-IMAGE() cannot load the specified
image file, it returns an error indicating the reason for the failure.
LOAD-IMAGE-DOWN( ), LOAD-IMAGE-UP( ), LOAD-IMAGE-INSENSITIVE( ),
and LOAD-ICON( ) methods. This feature is less useful,
however, because these methods are generally called for transient graphical-interface events
requiring an immediate response, which a Web download might not be able to satisfy.