This topic is locked

Using the file field

1/1/2009 5:41:58 PM
PHPRunner General questions
H
horsey_kim author

I want to create some links to a network drive. I need to save the network url in a field, but I want to make sure there is not typos. So I was thinking of using the file field and it would show the Browse button, so that it selects the file name where the file is located, but I don't want it to upload the file, just save the name as it would appear for the network with all the url intact. Is this possible with the file field?

A
alang 1/4/2009

I wanted to do the same thing but apparently not possible. See http://www.asprunner.com/forums/index.php?showtopic=6216

H
horsey_kim author 1/5/2009

The best I have been able to do is with a text field also. I tested it on my own network (4 computers, some run xp and some vista), it worked.
The company I am building the site for has about 50 computers all networked. And the files I need links to are all on one windows computer. All computers run windows.

Most of their employees know just enough to get around on the computer, so I wanted to be able to use the browse feature, so they could pick the file. Then have the url of that file save on the database (not upload the file).
I understand that a computer not on their network would error. But they only need access to the file if they're in the office. Primarly to look up a client file if talking on the phone with a customer. Out in the field they have no need to look at that file, but need to pull up other info that is in the database. That is why I chose to create something online to go both directions.
Here is what I did for the settings on the text field that worked.



Since they will access the same NETWORKCOMPUTERSNAME, i might just have them put their files in the same Directory.

Then change the url for the field to: file:///\\NETWORKCOMPUTERSNAME\DIRECTORY\

Then they only have to type in the filename.ext - they should be able to do that easy enough.
But a browse button and save that url would be what I really needed.
I don't know if that helps <img src='https://asprunner.com/forums/file.php?topicimage=1&fieldname=reply&id=36447&image=1&table=forumreplies' class='bbc_emoticon' alt=':)' />
Kim

A
alang 1/6/2009

Interesting idea Kim - thanks. I must admit I am leaning towards the concept of storing files in the database primarily and then having a system to save a copy to a network location if required by other apps etc. Really a document management system with the database as the repository. The issue of allowing users outside the site to access files is problematic with the file links (access rights) but becomes much easier if embedded in the database.
Alan