I made a script that allows a user to upload a file to the server, but I want the server to be aable to show picture files that were uploaded in a nice format... how would I go about doing this?
I'm not sure I understand your question. Do you want the visitor to see the files after they are uploaded or do you mean you want the server to display them later such as in thumbnail page?
Assuming you're uploading the files to the same directory as the script, something like <cfoutput><img src="#cffile.serverfile#"></cfoutput> should allow them to see what they uploaded. As far as a thumbnail page goes, you'll need to store the name of the file in a database and then retrieve it for your thumbnails page. The code above would work in this case as long as you change "cffile" to your query name.
Am I missing something? I feel like I'm technically answering your question when you're really looking for something else.
I've been trying it out and I cant exactly seem to get it to work. it always comes up empty with an error message. could you make me a small code snippet with the variable being passed as "file1"?
That would be quite helpful, thanks much in advance!
Did you get this to work? I've been real busy and didn't get a chance to look at it again. Let me know if you still need help and I'll try to create you a quick code snippet.
I did get the basic script to work, but I wanted to try using the database to show thumbnails of all uploaded images, however, I cannot get the myodbc or merant mysql drivers in linux to work with coldfusion5, and no one seems to know how to fix it.
If you could help me diagnose that, I would be really greatful! Using MyODBC driver I get a IM03 error : Specified driver could not be loaded.
Got an idea about this? Maybe you could explain how you installed it?
I've never run CF on anything but NT so I don't really have any experience in that area. I did a quick search on the Allaire Forums but didn't turn up anything there specific to your situation. You might want to spend some time going through their forums as there seems to be a lot of info on CF5/db connection problems.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.