PathToURL function

Official Content
This documentation is valid for:

To return the URL under which the Blob content is accessible in the web server, to convert a path (typically the Blob local storage path) into a URL.

Syntax

PathToURL(BlobAttribute)

Type Returned:
Character

Where:

BlobAttribute
    Must be a variable or attribute of Blob data type (or based on an attribute or domain of Blob data type).

Description

It returns the URL under which the Blob content is accessible in the web server. To be used in cases where the user needs to know this URL. For example, it should be used when loading an image with the LoadBitmap function:

&Url = PathToUrl(BlobAttribute)
&Logo = LoadBitmap(&Url)

Example

Suppose the web application is stored in c:\webapp, and the Blob local storage directory property is set to c:\webapp\dir, and the URL of the application is http://server/webapp/myapp.aspx.

Variable Type  

&AttBlob   Blob (based on AttBlob which is of the Blob type)
&URL C(2048)

Source:

for each where ...
    &AttBlob = AttBlob
endfor
&URL = PathToURL(&AttBlob)

Then, &URL will contain something like http://server/webapp/dir/file1234.jpg.

Scope

Objects Procedure object, Transaction object, Web Panel object
Platforms Web, Smart Devices(iOS)


See also

Blob data type





Was this page helpful?
What Is This?
Your feedback about this content is important. Let us know what you think.