--- In zope@yahoogroups.com, Sorin Marti <mas@s...> wrote:
> Hi all,
>
> I
want to upload files to the filesystem on my server (not into zope's
>
Data.fs)
>
> With <input type="file" name="file"> I get the
filename...right?
>
> But If I want to copy it with an external
method like this:
>
> copy = os.system('cp %s /tmp'
%file.filename)
>
> it doesent work because file.filename is only
the file but not the
> path... (for example test.pdf)
>
>
How do I get the path?
I think you're asking the wrong question. I suppose
what you
want to know is how to get the file content. You have to do
something like this:
fileContent=context.REQUEST.form['file'].read()
Then, you have to take a look at
the localfs dtml methods to
see how a file is
created in the local file system.
Regards,
Josef