No announcement yet.

Upload files to a directory

  • Filter
  • Time
  • Show
Clear All
new posts

  • Upload files to a directory

    I need to create a form that uploads files into a folder together with other data. Then have that info displayed on a grid and with links to the files.
    have seen all tutorials are refering to use of blob database. But there is no tutorial specifically for "Document(filename)".

    So I tried to do it myself
    - I created a table with fields primary (Auto-inrement), foreign key to the grid, longblob (which I don't need but system keeps on insisting for upload field), filename field which even the name not saving
    - Have created a folder and specified it in "Subfolder"

    So when I upload, the files are being saved as Blob, but I need them to be uploaded to a folder and their names saved on the table.

    Please view the screenshot

  • #2
    Document Filename is very similar to the blob version.
    If you use Document Filename then the filename is stored. You should use a VARCHAR field for this (or any other long enough string field).
    Then you need to use advanced deployment when deploying and set the directories there.
    The document filename holds the filename of the uploaded file. The subfolder holds the directory where you place it.
    So all you now need to do is to change the blob field type to a varchar that is long enough. Under windows 255 is the longest file name length afaik.