Page 1 of 1
Filesize parameter is missing
Posted: Wed Feb 27, 2008 8:21 pm
by import
Hello
I want to upload several files with "JFileUpload".
The filename and size should be saved in a MYSQL-database.
Filename postparameter is working well so far.
But filsize parameters are always '0'.
I selectet 'extra' at the 'postparmeter'- parameter (inside the applet_ftp.js), and i know that all parameters are correct (well, i believe).
the columm where the filesize should be saved (in the MYSQL-database), is declared as 'text'.
Please give me a hint why filesize-params are not correct.
Thanks so far.
Re: Filesize parameter is missing
Posted: Wed Feb 27, 2008 8:21 pm
by import
Are you using any "template" or "chunksize" parameter ?
Re: Filesize parameter is missing
Posted: Wed Feb 27, 2008 8:22 pm
by import
Yes.
I have this parameter :
<PARAM NAME="template" VALUE=":timestamp:_:name::extension:">
and then follows this parameter :
<PARAM NAME="postparameters" VALUE="extra">.
is there any limitation of parameters?
Thanks for response.
best regards
Re: Filesize parameter is missing
Posted: Wed Feb 27, 2008 8:22 pm
by import
Yes, I think so. Could you make a test by removing "template" parameter ?
Re: Filesize parameter is missing
Posted: Wed Feb 27, 2008 8:23 pm
by import
okay.. here is what i tryed.
I disabled "template" parameter, and saved the complete _POST in my database.
But filesize was '0' again.
I disabled some other parameters ("maxfiles","deleteonfail","post" and so on)
and finally disbled the "ziponfly"-parameter, wich was set to "zip", then saved the _POST again.
Now i got a value which seems to be correct and useable, but the file is not compressed.
Unfortunately i need this "ziponfly"-parameter.
You have any clue what i could do?
Or do i have to decide between this two parameters?
grettings
Re: Filesize parameter is missing
Posted: Wed Feb 27, 2008 8:23 pm
by import
Ok, so problem comes from ziponfly parameter. Do you except filesize before compression or after ? I'm going to see how to fix this issue.
Re: Filesize parameter is missing
Posted: Wed Feb 27, 2008 8:24 pm
by import
Could you try the add the following parameter:
<PARAM NAME="param8" VALUE="selectedfullfilename">
<PARAM NAME="value8" VALUE="initial">
Re: Filesize parameter is missing
Posted: Wed Feb 27, 2008 8:25 pm
by import
I get the filesize after uploading.
Okay.. i tested your parameters.
here are all important parameters i used in the test
"ziponfly" VALUE="zip"
"template" VALUE=":timestamp:_:name::extension:"
"post" VALUE="myserver/myfolder/myfile.php"
"postparameters" VALUE="extra"
and your
<PARAM NAME="param8" VALUE="selectedfullfilename">
<PARAM NAME="value8" VALUE="initial">
The result is strange.
The file is saved correct on the server(with timestamp and ziped). But the _POST to my php-file (which is getting saved to my database) is the normal filename.
For example:
Im uploading "test.txt".
The file is saved to my server, and in my database.
Filebrowser says, the filename is "12812585_test.txt.zip".
But the database has saved "test.txt".
Hope you understand what i am trying to say.
But at least, the filesize is postet as well.
It would be great if i could save the renamed filename (with timestamp) in my databse, but if this is not possible i can live without it.
maybe you have one more clue for me.
Thanks for great work so far.