Ah, sorry, I didn't get your question then.
Have a look at:
http://webware.colorstudy.com/twiki/bin/view/Webware/FileStreamingAndContentDisposition

To make things short, you have to set the filename in the http header and 
declare the file as an attachment.
If you have any question about the code in the above article, please feel 
free to ask.

Stephan

On Monday 16 December 2002 14:52, you wrote:
> On Mon, 2002-12-16 at 14:47, Stephan Diehl wrote:
> > On Monday 16 December 2002 14:32, you wrote:
> > > I'm trying to set up a virtual filesystem using webware. I'll try to
> > > give an example:
> > >
> > > http://foobar.com/Files/jalla.pdf?id=2
> > >
> > > This would mean that the browser will take "jalla.pdf" as the filename
> > > to save as, and the id will be what I use to look up in my database.
> > > "select file from foobar where id=2"
> > >
> > > So, in general - how do I do this. Any pointers, anyone?
> >
> > It might be a little bit more complicated than that.
> > 1. Use the file upload mechanism to get the file into your web
> > application. You'll find an example in the WebKit examples.  (This will
> > give you both, the filename and the file)
> > 2. Save the file on the filesystem and make an entry in your database. At
> > least with MySQL you'll get back the id of the newly inserted item.
> >
> > Unfortunatelly, all people doing some document management system with
> > webware are doing this as closed source (me included). I'm not aware of
> > any open source example you might have a look at it.
> >
> > Depending on what you want to do, this might not the "I am done over the
> > weekend" job.
>
> I have all things set up. File-uploading and writing to the database.
> The problem is just that when you want to get the file by any
> conventional means - by i.e. File?id=2 you will notice that the "save
> as" will prompt the user to save it with the filename "File", and not
> what it was uploaded as. So thats why I thought about doing some kind of
> PATH_INFO convertion-routine. But finding any documentation/examples on
> this is rather futile (especially since I really don't know what to look
> for).


-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to