You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by Rafal Krzewski <Ra...@e-point.pl> on 2001/04/02 16:06:26 UTC

Re: Upload Server Fundamentals

Doug Phillips wrote:

> 1. Shouldn't the <input type="file" name="filename" > actually be <input
> type="file" name="filename" value="c:\\myfile" /> ??

No... You want the user to click the "browse" button and chose a file
him/herself!

> 2. If I don't specify a particular filename value, does Turbine look for ALL
> files in the directory specified by "respository" ?  (This isn't happening).

Pardon? The "repository" is the directory on the *server* to store the 
contents of the files temporarily.

> 3. Does Turbine copy the file to the server?  Where does it put it?  Or is
> it up to my action class to read the file data using FileItem and store it
> somewhere?

The browser sends the file to the server, Turbine decodes it from the
request
body and puts into a FileItem. Depending on the file size and your
settings
it can be kept in memory, or be stored into a temporary file in the
"repository".
It is the responsibility of your action code to do something useful with
the
file item (like getting an InputStream from the FileItem object and
reading
it's contents)

> 4. Is it required that the form have a Submit button?  In my case I'm
> calling submit from javascript instead.

Well, you form needs to be submited to the server to get the file
uploaded...
JavaScript should work just fine.

> 5. Is there any sample code that implements Turbine Upload Services?  Not
> just snippets of code like the doc has -- but real sample code that really
> works -- something I can verify myself by running it.

Jason wanted to include an example of FileUploading in the TDK. We
discussed
it a while ago on the list. I don't know if it was completed.

Rafal

--
Rafal Krzewski
Senior Internet Developer
mailto:Rafal.Krzewski@e-point.pl
+48 22 8534830 http://e-point.pl

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org


Re: Upload Server Fundamentals

Posted by Jason van Zyl <jv...@apache.org>.
Rafal Krzewski wrote:
> 
> Doug Phillips wrote:
> 
> 
> Jason wanted to include an example of FileUploading in the TDK. We
> discussed
> it a while ago on the list. I don't know if it was completed.

There is example code for a file upload in the TDK, it is not
hooked up and I haven't tested it in the TDK but I took it
from Tambora where it works well. The example will work
shortly, but if you have the TDK then you can take a peek
at it in there.


-- 
jvz.

Jason van Zyl
jvanzyl@apache.org

http://jakarta.apache.org/velocity
http://jakarta.apache.org/turbine
http://tambora.zenplex.org

---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-user-help@jakarta.apache.org