Re: [WebDNA] plupload ?

This WebDNA talk-list message is from

2012


It keeps the original formatting.
numero = 108284
interpreted = N
texte = 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]=09 [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, >=20 > in a previous topic you mentioned the upload script from plupload.com, = looks very nice! >=20 > Did you write your own WebDNA as replacement for the upload.php? > (i don't wanna run php if not neccessary ...) >=20 > Would you min sharing your code? >=20 > Thierry--------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] plupload ? (William DeVaul 2012)
  2. Re: [WebDNA] plupload ? (Steve Craig 2012)
  3. Re: [WebDNA] plupload ? (aaronmichaelmusic@gmail.com 2012)
  4. Re: [WebDNA] plupload ? (Steve Craig 2012)
  5. Re: [WebDNA] plupload ? (Thierry Almy 2012)
  6. Re: [WebDNA] plupload ? (Steve Craig 2012)
  7. Re: [WebDNA] plupload ? (aaronmichaelmusic@gmail.com 2012)
  8. Re: [WebDNA] plupload ? (Steve Craig 2012)
  9. Re: [WebDNA] plupload ? (Thierry Almy 2012)
  10. Re: [WebDNA] plupload ? (Steve Craig 2012)
  11. Re: [WebDNA] plupload ? (Steve Craig 2012)
  12. Re: [WebDNA] plupload ? (Thierry Almy 2012)
  13. Re: [WebDNA] plupload ? (aaronmichaelmusic@gmail.com 2012)
  14. [WebDNA] plupload ? (Thierry Almy 2012)
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]=09 [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, >=20 > in a previous topic you mentioned the upload script from plupload.com, = looks very nice! >=20 > Did you write your own WebDNA as replacement for the upload.php? > (i don't wanna run php if not neccessary ...) >=20 > Would you min sharing your code? >=20 > Thierry--------------------------------------------------------- > This message is sent to you because you are subscribed to > the mailing list . > To unsubscribe, E-mail to: > archives: http://mail.webdna.us/list/talk@webdna.us > Bug Reporting: support@webdna.us aaronmichaelmusic@gmail.com

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

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...

Related Readings:

WebCat2b13MacPlugIn - More limits on [include] (1997) User/pass with tcpconnect (2000) carriage returns in data (1997) ReturnRaw and redirect (1997) CSS positioning!!! (2001) no emailfolder errors? (2000) [WebDNA] Virtual server (2011) Lineitems not showing up in ThankYou page (2006) ShowNext for method=POST (1997) [writefile] (1997) Trigger to restart Webcat Service (2001) Running _every_ page through WebCat ? (1997) creator code (1997) HTML Editors (1997) [WebDNA] Cookies & localhost (2008) WebCat2b12 - nesting [tags] (1997) Date Help! (2003) Templates for Customer Database? (1997) Redirect frame targets (1998) Help! WebCat2 bug (1997)