User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 374,179 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,456 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser:
Views: 7877 | Replies: 5
Reply
Join Date: Oct 2004
Posts: 3
Reputation: alwaysneedhelp is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
alwaysneedhelp alwaysneedhelp is offline Offline
Newbie Poster

want to upload images to access db from ColdFusion

  #1  
Oct 2nd, 2004
I'm building a property management site in ColdFusion. I'm building an admin area where the agent can upload a thumbnail of property to be displayed next to other features of the property. Idealy I'd like to have many listings on one page. I've seen it on the web so many times. I just can't figure out how to do it. Please help! Anyone!
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Aug 2004
Posts: 3
Reputation: srinu is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
srinu srinu is offline Offline
Newbie Poster

Solution Re: want to upload images to access db from ColdFusion

  #2  
Nov 29th, 2004
hi

for this when the user uploading the pictures, upload them into a directory and give a unique name for that image. store this image name in the db.

when your showing the lsting for the user, in the src attritubute of the img tag give that image path, so that whatever the image which the user uploaded that will be displayed. in the database just store the path of that image. that's it.

for eg.

<img src="#query.imagepath#"> this image path will get from a query.

Srinivas
Reply With Quote  
Join Date: May 2005
Posts: 2
Reputation: tigeralex is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 1
tigeralex tigeralex is offline Offline
Newbie Poster

Solution Re: want to upload images to access db from ColdFusion

  #3  
May 11th, 2005
That's all well and good, but that's not the end of the story.

You can't have a user connect to FTP, find folders then upload and delete after use, it's a waste of time (yours training them and the clients).

You'll need to create a script that'll upload the image, rename it to a unique autonumber then call on it when needed.

Don't forget you'll need the system to delete the image, as well as the record, when a user chooses to delete a property.

The only script I have that does all this is ASP, I'm trying to find the CF version myself and came across this thread, and wanted to ensure you got the right direction

Luv and fluff,

Tiger
Reply With Quote  
Join Date: Jul 2004
Posts: 8
Reputation: cfnut is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
cfnut cfnut is offline Offline
Newbie Poster

Re: want to upload images to access db from ColdFusion

  #4  
May 19th, 2005
Uploading a file is the easy part. Renaming it is might not be possiable. I have been trying for a very long time and nobody seems to be able to help.
Reply With Quote  
Join Date: Oct 2004
Posts: 3
Reputation: alwaysneedhelp is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
alwaysneedhelp alwaysneedhelp is offline Offline
Newbie Poster

Re: want to upload images to access db from ColdFusion

  #5  
May 19th, 2005
Thank you for the reply. I've got the site up and running. However, for my client to add the property she has to fill out a form with the property details, I labeled the send button "next" and what it actually does is submit the data from the form into the database then redirects to the "upload image" page. I have a browse button for her to grab an image off her machine then it uploads the image into a folder and save the image name in a seperate table in the DB. I can't seem to figure out how to add the image and the propety details at the same time so that the unique IDs match. As a result the tables aren't matching and I have to go in and manually line everything up again. It sucks. I know there is an easier way in CF. I just haven't found it yet.

Any guidance would be awesome.

Thank you
Reply With Quote  
Join Date: May 2005
Location: Tucson
Posts: 3
Reputation: WrkrAnt is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
WrkrAnt WrkrAnt is offline Offline
Newbie Poster

Re: want to upload images to access db from ColdFusion

  #6  
May 26th, 2005
If the details table has a primary key, include it as the foreign key in your images table for every image record for that particular house. The form will update the images table with this value and you'll never be out of synch.
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb ColdFusion Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the ColdFusion Forum

All times are GMT -4. The time now is 4:35 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC