Official Content

Converts a path (typically the Blob local storage path) into a URL, returning the URL under which the Blob content is accessible in the Web Server.

Syntax

PathToURL(BlobAttribute)

Where:

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

Type Returned:
Character (URL)

Scope

Objects:Procedure, Transaction, Web Panel
Generators: .NET .NET Framework, Java, Apple

Description

It returns the URL under which the Blob content is accessible in the Web Server. You can use this function in cases where you need to know this URL. For example, when loading an image with the LoadBitmap function:

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

Samples

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.

See Also

Blob data type







Last update: February 2024 | © GeneXus. All rights reserved. GeneXus Powered by Globant