Using the W* upload p-i with webcat

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 16598
interpreted = N
texte = Some time ago I sent a request for help with integrating the uploading of pictures with the W* upload pi with a webcat solution I was writing. By then I didnt get any good answers, but ver. 2.1 came to my resque. I thought I might share my solution with the group.I wanted the user to be able to use the upload feature of W* to upload a picture and then having the database take control over the picture. I solved this by doing the following: The .tmpl that contains the form that allows the submitting of a file does the following (when loaded): 1. Creates a directory with a unique name 2. Write a index.html file in that directory (this file is returned to the browser when the upload is complete) 3. Points the upload URL to that directoryThe index.html file contains a link to a page that: 1. Moves the file to the folder it is supposed to reside, giving it a name consisting of the unique name + .gif/.jpg based on the suffix the file has when it is uploaded. 2. Registers the name in the webcat database 3. Deletes the files/folderI know that all this could be done in one step, if i choose to let all html-pages be prosessed by webcat, but I dont do that at the moment.This solved my problem, hope it can be of use to somebody else.I would also like to say a large thankyou to Grant and John for superb support these 3 months I have been using WebCat. They even implemented support for nordic chars in the first beta released after my request! What if all software companies had been like this ...Sincerely, Per Christian Lied-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ Per Christian Lied, Web InfoTech as http://www.webinfotech.com/tel: +47 22 95 84 22 fax: +47 22 60 44 27 mob: +47 92 44 29 66 email: pk@pluto.wit.no Associated Messages, from the most recent to the oldest:

    
  1. Using the W* upload p-i with webcat (Per Christian Lied 1998)
Some time ago I sent a request for help with integrating the uploading of pictures with the W* upload pi with a webcat solution I was writing. By then I didnt get any good answers, but ver. 2.1 came to my resque. I thought I might share my solution with the group.I wanted the user to be able to use the upload feature of W* to upload a picture and then having the database take control over the picture. I solved this by doing the following: The .tmpl that contains the form that allows the submitting of a file does the following (when loaded): 1. Creates a directory with a unique name 2. Write a index.html file in that directory (this file is returned to the browser when the upload is complete) 3. Points the upload URL to that directoryThe index.html file contains a link to a page that: 1. Moves the file to the folder it is supposed to reside, giving it a name consisting of the unique name + .gif/.jpg based on the suffix the file has when it is uploaded. 2. Registers the name in the webcat database 3. Deletes the files/folderI know that all this could be done in one step, if i choose to let all html-pages be prosessed by webcat, but I dont do that at the moment.This solved my problem, hope it can be of use to somebody else.I would also like to say a large thankyou to Grant and John for superb support these 3 months I have been using WebCat. They even implemented support for nordic chars in the first beta released after my request! What if all software companies had been like this ...Sincerely, Per Christian Lied-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_-_ Per Christian Lied, Web InfoTech as http://www.webinfotech.com/tel: +47 22 95 84 22 fax: +47 22 60 44 27 mob: +47 92 44 29 66 email: pk@pluto.wit.no Per Christian Lied

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Navigator 4.01 (1997) RE: Missing contexts on NT (1997) close to search (2001) MacWorld NY (2000) Busted at the Border (1998) Cancel Subscription (1996) Online reference (1997) Sorting problem (1997) Potential Conflicts? (1997) Weird problems with [SHOWIF]s (1997) [OT] For Mac Users (1999) Hierarchy of form/text/math variables (renamed thread) (2000) multi-paragraph fields (1997) [Announce]: Web server security and password protection (1997) customizing the color of user's pages (1997) Pager notification of completed orders (1998) record locking (2000) Reverse text string (2002) Re1000001: Setting up shop (1997) Re:Help name our technology! (1997)