Upload and save to Db Binary Files

  1. 4 months ago

    Alexis C

    Nov 16 Pre-Release Testers Puerto Rico, USA

    if any example to upload a binary file and save it to the data base like PostgreSQL


  2. Greg O

    Nov 16 Xojo Inc

    look in the examples for the file uploader example. Once the FilesUploaded event fires you just use a BinaryStream to read the content, possibly encode it (hex or base64) and then write the data to a field.

  3. Alexis C

    Nov 17 Pre-Release Testers Puerto Rico, USA


  4. Alexis C

    Nov 20 Pre-Release Testers Puerto Rico, USA

    This is the code i use for Picture but what have to change for binary files
    I am a litter confuse with web file upload

    Dim imageData as String
    Dim Rs As RecordSet
    Dim Db As DatabaseRecord
    Dim bs as BinaryStream
    Dim f as FolderItem
    Dim p as picture

    If p <> NIL and droppicture <> Nil then //<< == (but hire is empty )
    f = SpecialFolder.Temporary.Child( "Temp_Image.jpg" )
    If bs <> NIL then
    imageData = bs.read(bs.length )
    Db.BlobColumn("Foto") = imageData
    End if

or Sign Up to reply!