473,473 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Get File Location and store in Field

139 New Member
Hi,

I've created a form that allows the user to upload an attachment.

I can save the attachment with <cffile> and create a directory (if none exists) with <cfdirectory>. However, I want to save the absolute filepath to a database field so I can use it as a hyperlink later.

I've tried to concatenate the directory path with a trimmed version of the form.UploadFile field contents, but it doesn't seem to work as I get back a c:.TMP file name instead of that which was actually uploaded.

Any ideas how I pull the location of the uploaded file back to a database?

thanks
neil
Jun 2 '11 #1
2 2291
acoder
16,027 Recognized Expert Moderator MVP
Use cffile.serverFile.

Note that cffile might be named differently if you specified a value for the 'result' attribute.
Jun 2 '11 #2
ndeeley
139 New Member
That works brilliantly, thanks for your help acoder!
Jun 2 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Kory Postma | last post by:
I would like to know if there is anyway to get the exact file location on a harddrive? For instance, you pass a filename and you can then get the head, track, sector, etc.. of the file (and its...
0
by: R.A. | last post by:
Hi Is there a way to specify the EventLog file location? The application I have is writing to its own event log file but I don't know how can I set the location where this file will be located....
1
by: Jim Heavey | last post by:
Hello, I have done some volunteer work for my club and develop a web site in ASP.Net. I have the code working fine and now I am ready to move the code up to their web hosting company. I have...
5
by: aiki727 via DotNetMonster.com | last post by:
Hello everyone, Where do I store a bitmap or jpeg that I am using for a forms background image when I deploy the application? Or do I link these files to the app during the deployment? Thanks...
0
by: sowmiyaraman2000 | last post by:
i have to create a open dialogue box in web application( i have done it in windows application) it should be in such a way that if i click File-> open it should pop up open dialogue box with default...
5
by: evenlater | last post by:
I know how to determine the file location of the current Access database in VBA. But I'm trying to figure out how to determine the file location of my back-end. Anybody know how I can call up the...
4
by: Bob Altman | last post by:
Hi all, When I create a new website (click on "Create: Website" from the start page), I'm prompted for the location of the project files, but VS 2005 always creates a SLN file under the Visual...
2
by: ahmurad | last post by:
Dear Brothers, I am using a 'text file location' at my code to read the file contents- which is working fine in my local server. The web contents/php files and the specified txt file are at the...
4
by: mcare | last post by:
I am trying to load an image file location to a mysql table via php I can type the location into the form but wish to browse for the file then submit into the varchar table.
0
by: bluethunder | last post by:
Good day! I'm having a problem with my program with regards in reports. I'm using VB 6, .mdb as my back end and Crystal Report 8.5 for my reports. After I input the required data and press the...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.