Storemodel and MemoryStore

Upload core product.
Post Reply
Peter
Posts: 7
Joined: Tue Nov 08, 2011 1:33 pm

Storemodel and MemoryStore

Post by Peter »

Hi,

I don't understand how to use different storemodel and especially MemoryStore.

Do you have an example of using MemoryStore?
Moreover, I don't understand how to use the upload when it is stored in memory.

Thank you for your return
Peter.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Storemodel and MemoryStore

Post by support »

It's the place the file will be stored. Default is on disk in a folder, but it could be in ZIP archive or in memory. Memory does not fit to most usage.

Peter
Posts: 7
Joined: Tue Nov 08, 2011 1:33 pm

Re: Storemodel and MemoryStore

Post by Peter »

First of all, thank you for your return.

I have a problem with the resume.
First, this is my work environment:
The applet JFileUpload is in a jsp based on a servlet (processServlet.java) which contains the upload processing (ie which contains the Java code process.jsp).

When I upload a file and I cancel it before the end, I can easily resume it ("resume" means : I selected again the same file via the window "File chooser"). However, I can't resume a broken upload : during uploading, I shut down my server to simulate a network failure => when I select the same file again (by choosing the same file through the window "File chooser "), uploading start from scratch.

What I note is that when I cancel during the upload, I have the file in my folderstore (of course, it hadn't the well size). However, when I cut my server during the upload nothing is stored in the folderstore.

I give you ma applet parameters:
<PARAM NAME = "scriptable" VALUE="true">
<PARAM NAME = "url" VALUE="http://localhost:26000/ProtoJFileUpload ... properties">
<PARAM NAME = "post" VALUE="http://localhost:26000/ProtoJFileUpload/ForwardUpload">
<PARAM NAME = "postparameters" VALUE="true">
<PARAM NAME = "paramfile" VALUE="uploadfile">
<PARAM NAME = "param1" VALUE="todo">
<PARAM NAME = "value1" VALUE="upload">
<PARAM NAME = "folderdepth" VALUE="-1">
<PARAM NAME = "param2" VALUE = "relativefilename">
<PARAM NAME = "value2" VALUE = "true">
<PARAM NAME = "param3" VALUE = "notifyrelativefilename">
<PARAM NAME = "value3" VALUE = "true">
<PARAM NAME = "maxsize" VALUE="167772160">
<PARAM NAME = "maxfiles" VALUE="1">
<PARAM NAME = "mode" VALUE="http">
<PARAM NAME = "resources" VALUE="i18n_TestBis">
<PARAM NAME = "whitelist" VALUE="*.zip,*.rar,*.txt">
<PARAM NAME = "verbosemode" VALUE="debug">
<PARAM NAME = "preferences" VALUE="true">
<PARAM NAME = "resume" VALUE="crc">
<PARAM NAME = "param4" VALUE="errorheader">
<PARAM NAME = "value4" VALUE="Error Test 2 !!!">
<PARAM NAME = "shorterrorjs" VALUE = "true">
<PARAM NAME = "param5" VALUE = "cookiename">
<PARAM NAME = "value5" VALUE = "JSESSIONID">
<PARAM NAME = "param6" VALUE = "cookievalue">
<PARAM NAME = "value6" VALUE = "<%= sessionid %>">
<PARAM NAME = "checksum" VALUE = "crc">
<PARAM NAME = "overwrite" VALUE="true">

Thank you,
Peter.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Storemodel and MemoryStore

Post by support »

Do you have something in tmpdirectory setup in JSPUpload when you kill server while uploading?

Peter
Posts: 7
Joined: Tue Nov 08, 2011 1:33 pm

Re: Storemodel and MemoryStore

Post by Peter »

Yes, I have a file like that "upload__78cf8552_133b0fa324d__7ff8_00000007.tmp".

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Storemodel and MemoryStore

Post by support »

When you hist cancel, the tmp file should be copied in final folder. Did you modify anything more (except folders) in process.jsp?

Peter
Posts: 7
Joined: Tue Nov 08, 2011 1:33 pm

Re: Storemodel and MemoryStore

Post by Peter »

Hi,

I'm agree with you : when i "cancel" the upload, the tmp file is copied in final folder.
But when i shut down my WebServer, how it's possible that my application do the same thing => that is to say copy the tmp file in the final folder.

You ask me if I changed something in process.jsp. I haven't process.jsp because I use a servlet which contains the upload processing (ie which contains the Java code process.jsp).

I try the same thing with process.jsp => when i shut down my WebServer, the tmp file stay in the tmp folder and the final folder is empty.

If you want i can show you my servlet but i don't know how i can transfer you a file.

Thanks,
Peter.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Storemodel and MemoryStore

Post by support »

If you kill server then temporary file may not be copied in final folder.

Peter
Posts: 7
Joined: Tue Nov 08, 2011 1:33 pm

Re: Storemodel and MemoryStore

Post by Peter »

Hello,

I thought a process during the restart or during the recovery of the upload could identify that there is a tmp file in order to resume the upload.
What problems are managed when you talk about "JFileUpload could resume broken upload"? and how ?

Thanks,
Peter.

User avatar
support
Posts: 1503
Joined: Sun Jan 27, 2008 6:19 pm

Re: Storemodel and MemoryStore

Post by support »

Broken upload: Network issue (disconnect) or client-side crash.

Post Reply