This topic is locked

Full path for file link field

9/10/2007 7:21:16 PM
PHPRunner General questions
A
alang author

I have a field where I would like to store a full file path name to any file stored on our central file server. It would be useful to be able to use the same type of dialog box used to select a file to store in the database. The closest I have got so far to solving this is as follows:

  • the field in the database is set to varchar(100).
  • on the visual editor page I have the "View as" setting set to "Hyperlink" with URL prefix as "file://". When the field is set to "<servername>/<sharename>/<folder>/file.txt" for example, the file will be opened - this is just what I want.
  • on the visual editor page, I can set the "Edit As" to "Text Field" but then have to type the full path and file name manually. I can set the "Edit as" to "File" which will allow the file dialog (click on Browse button) to be used to allow navigation to the desired file but only the filename is stored - I need the path information as well.
    Is there any way to get the full path information from the dialog into my database field?

Sergey Kornilov admin 9/12/2007

Alan,
I'm afraid you cannot do this as browser do not provide this information to PHP application.