WebFile.Data
From Xojo Documentation
Property (As MemoryBlock )
aWebFile.Data = newMemoryBlockValue
or
MemoryBlockValue = aWebFile.Data
New in 2010r5
Supported for all project types and targets.
or
MemoryBlockValue = aWebFile.Data
New in 2010r5
Supported for all project types and targets.
Contains the data in the file. Data is initially a 0-byte MemoryBlock. The developer should create a new MemoryBlock of the size that will be needed to store the data.
Notes
You can also just assign a String as the Data.
Example
Create a new file for downloading:
TextFile = New WebFile // TextFile is a property of the web page
TextFile.MimeType = "text/plain"
TextFile.ForceDownload = True // If False, the browser may try to display the file instead of download it
TextFile.FileName = "TextFile.txt"
TextFile.Data = "Hello, world!"
ShowURL(TextFile.URL) // This causes the file to be downloaded
TextFile.MimeType = "text/plain"
TextFile.ForceDownload = True // If False, the browser may try to display the file instead of download it
TextFile.FileName = "TextFile.txt"
TextFile.Data = "Hello, world!"
ShowURL(TextFile.URL) // This causes the file to be downloaded