NetTalk Central
NetTalk Web Server => Web Server - Ask For Help => Topic started by: Jim A on July 14, 2012, 01:43:14 PM
-
I am using: self.site.UploadsPath = clip(self.site.WebFolderPath) & '\pictures' -- as directed for saving the photos into a designated path (in WebHandler). Works great.
On the Inventory Form I have INV:Photo as an Upload field. I also have it as a Display field. The display field under the Image Tab is prepended:
p_web.GSV('PhotoPath') & INV:Photo [PhotoPath is set at login to '\pictures']
This works correctly -- except that it stores the PhotoPath to the name of the photo. This causes a double PhotoPath --> '\pictures\pictures\myphoto.jpg'
I only want the photo name to be in the field, as this is also accessed by a desktop app on the LAN.
What am I doing wrong?
Thanks.
-
>I only want the photo name to be in the field, as this is also accessed by a desktop app on the LAN.
then put only the name of the photo in INV:Photo then it will works.
if you have:
p_web.SSV('PhotoPath','pictures\')
INV:Photo='myphoto.jpg'
p_web.GSV('PhotoPath') & INV:Photo = pictures\myphoto.jpg
I think this is what you want correct?
If you access this folder from a desktop app then you need to set the correct path.
"web\pictures\myphoto.jpg" or depends on your configuration.
Robert
-
Hi Robert: Almost. The only place I reference the PhotoPath is when I display the photo -- not on the entry control. What should be saved (as I see it) is just the Photo Name and not the path.
Thanks.
-
I think it is designed to have a fully qualified path. However you could just strip the folder from your DB field before saving.
-
Thank you Kevin, that should work.
Where would I do that? And, do I just reference the INV:Photo field when I strip off the path?
-
Try ValidateAll on the form