PDA

View Full Version : Databound cWebFileUploadForm?



Hans van de Laar
10-Feb-2014, 07:54 AM
Is it possible to bind a cWebFileUploadForm to a database column?

I've tried to do something like



Function OnFileUpload String sFileName Integer iBytes String sMime Returns String
String sPath

// Determine local path based on workspace setting
Get psDataPath of (phoWorkspace(ghoApplication)) to sPath

Move (sPath + "\Logos\" + sFileName) to sPath
Set File_Field_Entry of (Server(Self)) File_Field Leden.Logo (True) to sPath
Function_Return sPath
End_Function



but it doesn't get saved to the database.

Harm Wibier
10-Feb-2014, 08:03 AM
No, it isn’t. We considered doing that but other than a few technical constraints it also felt a little bit too messy.

You could either save the path in the record immediately or add a hidden cWebForm that is data bound.

Hans van de Laar
10-Feb-2014, 08:38 AM
Thanks Harm,

I've got it working now with a hidden cWebForm