Aaron,wow, I implemented it within 5 minutes =... awesome ... many thanks!!!The uploaded file is =written with a random name.I modified your script a bit, to =rename it to the original name after being =uploaded:[formvariables]---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list=[showif [name]^name=3D"name"]=[text show=3Dt]_fileName=3D[value][/text]=[/showif][showif =[name]^name=3D"chunk"]=[text]_chunk=3D[value][/text]=[/showif][showif =[name]^name=3D"chunks"]=[text]_chunks=3D[value][/text]=[/showif][showif =[name]^name=3D"destination"][!]my custom paramater[/!]=[text]_destination=3D[value][/text]=[/showif][showif =[name]^name=3D"file"]=[!]**** replace spaces with underscores in filename =****[/!]=[text]_filename=3D[listwords words=3D[_filename]&delimiters=3D =][hideif [index]=3D1]_[/hideif][word][/listwords][/text]=[text =show=3Df]orig_filename=3D[Middle =StartAfter=3Dfilename=3D"&EndBefore=3D"][name][/middle][/text]<=/div>=[if =("[chunk]"=3D"0")][then]=[writefile =[_destination][_filename]][value][/writefile][!]writefile for first =chunk[/!][/then]=[else][appendfile =[_destination][_filename]][value][/appendfile][!]appendfile for =proceeding chunks[/!][/else]=[/if]=[/showif][/formvariables][show=if [_chunk]=3D[math][_chunks]-1[/math]][!]if last chunk ---- chunks is =the total #integer of chunks - chunk(singular) is the particular chunk =starting with 0[/!][!]some function =here[/!][MoveFile =from=3D[_destination][_filename]&to=3D[_destination][orig_filename]]=font>[/showif]Am 26.01.2012 um 15:55 schrieb aaronmichaelmusic@gmail.com:Sure, here it is...
First, in my plupload page =(I'm using the jquery widget version), I add this line in the javascript =options
[code]
multipart_params : { 'destination': ='[destination]' },
[/code]
I also set my chunk size down a =little lower than default. I didn't realize that the newest build =of webDNA7 had any improvements on the file upload issue. Anyway, =when I was using an earlier build I had tweaked fastcgi and the chunking =rate to what was optimum for me.
[code]
chunk_size : ='500kb',
[/code]
where destination is a directory that I =specify dynamically. I'm my code example, I'm using an absolute =path (starting from the domain level of course) and ending in "/". = (ie /images/)
then, replace upload.php with this, =upload.dna
[code]
[formvariables]
[showif =[name]^name=3D"name"]
=[text]_fileName=3D[value][/text]
[/showif]
[showif =[name]^name=3D"chunk"]
=[text]_chunk=3D[value][/text]
[/showif]
[showif =[name]^name=3D"chunks"]
=[text]_chunks=3D[value][/text]
[/showif]
[showif =[name]^name=3D"destination"][!]my custom paramater[/!]
=[text]_destination=3D[value][/text]
=[/showif]
[showif =[name]^name=3D"file"]
[!]**** replace spaces with =underscores in filename ****[/!]
[text]_filename=3D[listwords =words=3D[_filename]&delimiters=3D ][hideif =[index]=3D1]_[/hideif][word][/listwords][/text]
[if =("[chunk]"=3D"0")]
[then]
=[writefile =[_destination][_filename]][value][/writefile][!]writefile for first =chunk[/!]
==[/then]
[else]
=[appendfile =[_destination][_filename]][value][/appendfile][!]appendfile for =proceeding chunks[/!]
[/else]
=[/if]
=[/showif]
[/formvariables]
[/code]
add this if =you want to do something after the file has completely =uploaded...
[code]
[showif =[_chunk]=3D[math][_chunks]-1[/math]][!]if last chunk ---- chunks is the =total #integer of chunks - chunk(singular) is the particular chunk =starting with 0[/!]
[!]some function =here[/!]
[/showif]
[/code]
On Jan 26, 2012, at 8:37 AM, =Thierry Almy wrote:Aaron,in a previous =topic you mentioned the upload script from plupload.com, looks very =nice!Did you write =your own WebDNA as replacement for the =upload.php?(i don't wanna run =php if not neccessary ...)Would you min =sharing your code?Thierry-----------------------------------------------------=----This message is sent to =you because you are subscribed tothe mailing list <talk@webdna.us>.To unsubscribe, E-mail to: <talk-leave@webdna.us> archives: http://mail.webdna.us/l=ist/talk@webdna.usBug =Reporting: support@webdna.us---------------------------------------------------------
This =message is sent to you because you are subscribed to
the mailing list =<talk@webdna.us>.
To =unsubscribe, E-mail to: <talk-leave@webdna.us>
archi=ves: http://mail.webdna.us/l=ist/talk@webdna.us
Bug Reporting: support@webdna.us.To unsubscribe, E-mail to: archives: http://mail.webdna.us/l=ist/talk@webdna.usBug Reporting: support@webdna.us
|
Aaron,wow, I implemented it within 5 minutes =... awesome ... many thanks!!!The uploaded file is =written with a random name.I modified your script a bit, to =rename it to the original name after being =uploaded:[formvariables]---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing list=[showif [name]^name=3D"name"]=[text show=3Dt]_fileName=3D[value][/text]=[/showif][showif =[name]^name=3D"chunk"]=[text]_chunk=3D[value][/text]=[/showif][showif =[name]^name=3D"chunks"]=[text]_chunks=3D[value][/text]=[/showif][showif =[name]^name=3D"destination"][!]my custom paramater[/!]=[text]_destination=3D[value][/text]=[/showif][showif =[name]^name=3D"file"]=[!]**** replace spaces with underscores in filename =****[/!]=[text]_filename=3D[listwords words=3D[_filename]&delimiters=3D =][hideif [index]=3D1]_[/hideif][word][/listwords][/text]=[text =show=3Df]orig_filename=3D[Middle =StartAfter=3Dfilename=3D"&EndBefore=3D"][name][/middle][/text]<=/div>=[if =("[chunk]"=3D"0")][then]=[writefile =[_destination][_filename]][value][/writefile][!]writefile for first =chunk[/!][/then]=[else][appendfile =[_destination][_filename]][value][/appendfile][!]appendfile for =proceeding chunks[/!][/else]=[/if]=[/showif][/formvariables][show=if [_chunk]=3D[math][_chunks]-1[/math]][!]if last chunk ---- chunks is =the total #integer of chunks - chunk(singular) is the particular chunk =starting with 0[/!][!]some function =here[/!][MoveFile =from=3D[_destination][_filename]&to=3D[_destination][orig_filename]]=font>[/showif]Am 26.01.2012 um 15:55 schrieb aaronmichaelmusic@gmail.com:Sure, here it is...
First, in my plupload page =(I'm using the jquery widget version), I add this line in the javascript =options
[code]
multipart_params : { 'destination': ='[destination]' },
[/code]
I also set my chunk size down a =little lower than default. I didn't realize that the newest build =of webDNA7 had any improvements on the file upload issue. Anyway, =when I was using an earlier build I had tweaked fastcgi and the chunking =rate to what was optimum for me.
[code]
chunk_size : ='500kb',
[/code]
where destination is a directory that I =specify dynamically. I'm my code example, I'm using an absolute =path (starting from the domain level of course) and ending in "/". = (ie /images/)
then, replace upload.php with this, =upload.dna
[code]
[formvariables]
[showif =[name]^name=3D"name"]
=[text]_fileName=3D[value][/text]
[/showif]
[showif =[name]^name=3D"chunk"]
=[text]_chunk=3D[value][/text]
[/showif]
[showif =[name]^name=3D"chunks"]
=[text]_chunks=3D[value][/text]
[/showif]
[showif =[name]^name=3D"destination"][!]my custom paramater[/!]
=[text]_destination=3D[value][/text]
=[/showif]
[showif =[name]^name=3D"file"]
[!]**** replace spaces with =underscores in filename ****[/!]
[text]_filename=3D[listwords =words=3D[_filename]&delimiters=3D ][hideif =[index]=3D1]_[/hideif][word][/listwords][/text]
[if =("[chunk]"=3D"0")]
[then]
=[writefile =[_destination][_filename]][value][/writefile][!]writefile for first =chunk[/!]
==[/then]
[else]
=[appendfile =[_destination][_filename]][value][/appendfile][!]appendfile for =proceeding chunks[/!]
[/else]
=[/if]
=[/showif]
[/formvariables]
[/code]
add this if =you want to do something after the file has completely =uploaded...
[code]
[showif =[_chunk]=3D[math][_chunks]-1[/math]][!]if last chunk ---- chunks is the =total #integer of chunks - chunk(singular) is the particular chunk =starting with 0[/!]
[!]some function =here[/!]
[/showif]
[/code]
On Jan 26, 2012, at 8:37 AM, =Thierry Almy wrote:Aaron,in a previous =topic you mentioned the upload script from plupload.com, looks very =nice!Did you write =your own WebDNA as replacement for the =upload.php?(i don't wanna run =php if not neccessary ...)Would you min =sharing your code?Thierry-----------------------------------------------------=----This message is sent to =you because you are subscribed tothe mailing list <talk@webdna.us>.To unsubscribe, E-mail to: <talk-leave@webdna.us> archives: http://mail.webdna.us/l=ist/talk@webdna.usBug =Reporting: support@webdna.us---------------------------------------------------------
This =message is sent to you because you are subscribed to
the mailing list =<talk@webdna.us>.
To =unsubscribe, E-mail to: <talk-leave@webdna.us>
archi=ves: http://mail.webdna.us/l=ist/talk@webdna.us
Bug Reporting: support@webdna.us.To unsubscribe, E-mail to: archives: http://mail.webdna.us/l=ist/talk@webdna.usBug Reporting: support@webdna.us
DOWNLOAD WEBDNA NOW!
The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...