Re: [WebDNA] plupload ?

This WebDNA talk-list message is from

2012


It keeps the original formatting.
numero = 108296
interpreted = N
texte = --Apple-Mail-7--744102473 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii sure, here it is ... I kept the files in its original directories (upload.dna -> examples and = jquery_ui_widget.dna -> jquery) just change the target upload folder ... I'm on OS X Lion=20 Thierry Am 26.01.2012 um 19:28 schrieb Steve Craig: > Can you send me your code that you used for the start page? The = example jquery_ui_widget.html has reference to Flash in the >=20 > and also in the... >=20 > runtimes : 'flash,html5,browserplus,silverlight,gears,html4', >=20 > If I change the runtimes variable to just html5 for example, it all = works but I am back to random names, only works correctly if the = runtimes include flash. Maybe your code is different or you have a = different download to me? >=20 > Cheers > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Steve Craig - Asylum Interactive Ltd > Tel +44 1330 860550 Fax +44 1330 860880 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > http://www.asylumweb.com > Email: steve@asylumweb.com > Skype: s.craig - iChat: steve.craig > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 >=20 >=20 >=20 > On 26 Jan 2012, at 17:54, Thierry Almy wrote: >=20 >> Aaron, >>=20 >> wow, I implemented it within 5 minutes ... awesome ... many thanks!!! >>=20 >> 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: >>=20 >>=20 >> [formvariables] >> [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] >>=20 >> [showif [name]^name=3D"file"] >> =09 >> [!]**** 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] >> =09 >> [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] >>=20 >> [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[/!] >> [MoveFile = from=3D[_destination][_filename]&to=3D[_destination][orig_filename]] >> [/showif] >>=20 >>=20 >>=20 >>=20 >> Am 26.01.2012 um 15:55 schrieb aaronmichaelmusic@gmail.com: >>=20 >>> Sure, here it is... >>>=20 >>> First, in my plupload page (I'm using the jquery widget version), I = add this line in the javascript options >>>=20 >>> [code] >>> multipart_params : { 'destination': '[destination]' }, >>> [/code] >>>=20 >>> 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. >>>=20 >>> [code] >>> chunk_size : '500kb', >>> [/code] >>>=20 >>> 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/) >>>=20 >>> then, replace upload.php with this, upload.dna >>>=20 >>> [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] >>>=20 >>> [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] >>>=20 >>> [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] >>>=20 >>>=20 >>> add this if you want to do something after the file has completely = uploaded... >>>=20 >>> [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] >>>=20 >>>=20 >>> On Jan 26, 2012, at 8:37 AM, Thierry Almy wrote: >>>=20 >>>> 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 >>>=20 >>> --------------------------------------------------------- >>> 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 >>=20 >> --------------------------------------------------------- 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 >=20 > --------------------------------------------------------- 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 --Apple-Mail-7--744102473 Content-Type: multipart/mixed; boundary=Apple-Mail-8--744102473 --Apple-Mail-8--744102473 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii
sure, here it is ...

I kept the files in its original directories (upload.dna -> examples and jquery_ui_widget.dna -> jquery)

just change the target upload folder ...

I'm on OS X Lion 

Thierry


--Apple-Mail-8--744102473 Content-Disposition: attachment; filename=plupload.zip Content-Type: application/zip; name="plupload.zip" Content-Transfer-Encoding: base64 UEsDBBQACAAIAEaKOkAAAAAAAAAAAAAAAAAUABAAanF1ZXJ5X3VpX3dpZGdldC5kbmFVWAwAWZwh T8R8IU/1AfUBrVdpb9s4EP1s/4qpWsAJ1hLtJAUa1zbQJr2AXtskm+0WhUFblERHV0nKR4P8952h ZFtJHLTZjVHUJjl8M/PmYvqPXPfti5PR+auXxx9fjE5fvDlx3WGz/+j409Hp18+vIDJJDJ/PXr5/ dwSOy9j5/hFjx6fH8Pfb0w/voet14FTxVEsjs5THjL366IATGZP3GJvP595838tUyE6/sAVhdely 9dM1tZueb3wHNVuFiyRO9WALTPfw8LC87YAv1cCJjbK3BPfxKxGGA91yxY9CzgbOJEuNSI1rlrlw oFoNHCMWhhHKc5hEXGlhBmenr91nDkMQI00shp/jIo8z7oML0z8LoZZw9g7OpR8K02elSLOvzTIW QOAV5kRrNKcxzvwlXDYbjQA1ugFPZLzs/SWUz1PehjciFTP81ui9q4WSwfOVqJY/Ra+7ny9oZ5LF meo93t/fp9WYTy5ClRWp3ytUvON5bBx60zzcxcOrZp9ZW9CmWKYXoEQ8c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0MuyaA1nD4DpLek LEd4AKozatxSpPScmIUOgpYV0UVlxDttI+7RC1eN+VPhVaBpO6P89dhBv0TUBYdOqIEvnHfqbXsz 7ETcwZFbq84WrJao0eMp9egO+KnXxLsmvyjqOrrXyReOA1Zn1Ok3UEsHCLXPiJ0DAgAA4AQAAFBL AQIVAxQACAAIAEaKOkCS4tm61wUAAOYOAAAUAAwAAAAAAAAAAECkgQAAAABqcXVlcnlfdWlfd2lk Z2V0LmRuYVVYCABZnCFPxHwhT1BLAQIVAxQACAAIAI2OOkC1z4idAwIAAOAEAAAKAAwAAAAAAAAA AECkgSkGAAB1cGxvYWQuZG5hVVgIAFmcIU/KhCFPUEsFBgAAAAACAAIAkgAAAHQIAAAAAA== --Apple-Mail-8--744102473 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

<= /div>
Am 26.01.2012 um 19:28 schrieb Steve Craig:

Can you send me your code that = you used for the start page? The example jquery_ui_widget.html has = reference to Flash in the <script = tags...

<script type=3D"text/javascript" = src=3D"../../js/plupload.flash.js"></script>

=
and also in the...

runtimes : = 'flash,html5,browserplus,silverlight,gears,html4',

If I change the runtimes variable to just html5 for example, it all = works but I am back to random names, only works correctly if the = runtimes include flash. Maybe your code is different or you have a = different download to me?

Cheers
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Steve Craig - Asylum Interactive Ltd
Tel +44 1330 860550 Fax +44 1330 860880
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
http://www.asylumweb.com
Skype: s.craig - iChat: steve.craig
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D



On 26 Jan 2012, at 17:54, Thierry Almy wrote:

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]
= [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]]
[/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 to
the mailing list <talk@webdna.us>.
To unsubscribe, E-mail to: <talk-leave@webdna.us>
archives: http://mail.webdna.us/l= ist/talk@webdna.us
Bug = 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

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us
= --Apple-Mail-8--744102473-- --Apple-Mail-7--744102473-- 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)
--Apple-Mail-7--744102473 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii sure, here it is ... I kept the files in its original directories (upload.dna -> examples and = jquery_ui_widget.dna -> jquery) just change the target upload folder ... I'm on OS X Lion=20 Thierry Am 26.01.2012 um 19:28 schrieb Steve Craig: > Can you send me your code that you used for the start page? The = example jquery_ui_widget.html has reference to Flash in the >=20 > and also in the... >=20 > runtimes : 'flash,html5,browserplus,silverlight,gears,html4', >=20 > If I change the runtimes variable to just html5 for example, it all = works but I am back to random names, only works correctly if the = runtimes include flash. Maybe your code is different or you have a = different download to me? >=20 > Cheers > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > Steve Craig - Asylum Interactive Ltd > Tel +44 1330 860550 Fax +44 1330 860880 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > http://www.asylumweb.com > Email: steve@asylumweb.com > Skype: s.craig - iChat: steve.craig > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >=20 >=20 >=20 >=20 > On 26 Jan 2012, at 17:54, Thierry Almy wrote: >=20 >> Aaron, >>=20 >> wow, I implemented it within 5 minutes ... awesome ... many thanks!!! >>=20 >> 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: >>=20 >>=20 >> [formvariables] >> [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] >>=20 >> [showif [name]^name=3D"file"] >> =09 >> [!]**** 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] >> =09 >> [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] >>=20 >> [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[/!] >> [MoveFile = from=3D[_destination][_filename]&to=3D[_destination][orig_filename]] >> [/showif] >>=20 >>=20 >>=20 >>=20 >> Am 26.01.2012 um 15:55 schrieb aaronmichaelmusic@gmail.com: >>=20 >>> Sure, here it is... >>>=20 >>> First, in my plupload page (I'm using the jquery widget version), I = add this line in the javascript options >>>=20 >>> [code] >>> multipart_params : { 'destination': '[destination]' }, >>> [/code] >>>=20 >>> 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. >>>=20 >>> [code] >>> chunk_size : '500kb', >>> [/code] >>>=20 >>> 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/) >>>=20 >>> then, replace upload.php with this, upload.dna >>>=20 >>> [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] >>>=20 >>> [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] >>>=20 >>> [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] >>>=20 >>>=20 >>> add this if you want to do something after the file has completely = uploaded... >>>=20 >>> [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] >>>=20 >>>=20 >>> On Jan 26, 2012, at 8:37 AM, Thierry Almy wrote: >>>=20 >>>> 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 >>>=20 >>> --------------------------------------------------------- >>> 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 >>=20 >> --------------------------------------------------------- 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 >=20 > --------------------------------------------------------- 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 --Apple-Mail-7--744102473 Content-Type: multipart/mixed; boundary=Apple-Mail-8--744102473 --Apple-Mail-8--744102473 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii
sure, here it is ...

I kept the files in its original directories (upload.dna -> examples and jquery_ui_widget.dna -> jquery)

just change the target upload folder ...

I'm on OS X Lion 

Thierry


--Apple-Mail-8--744102473 Content-Disposition: attachment; filename=plupload.zip Content-Type: application/zip; name="plupload.zip" Content-Transfer-Encoding: base64 UEsDBBQACAAIAEaKOkAAAAAAAAAAAAAAAAAUABAAanF1ZXJ5X3VpX3dpZGdldC5kbmFVWAwAWZwh T8R8IU/1AfUBrVdpb9s4EP1s/4qpWsAJ1hLtJAUa1zbQJr2AXtskm+0WhUFblERHV0nKR4P8952h ZFtJHLTZjVHUJjl8M/PmYvqPXPfti5PR+auXxx9fjE5fvDlx3WGz/+j409Hp18+vIDJJDJ/PXr5/ dwSOy9j5/hFjx6fH8Pfb0w/voet14FTxVEsjs5THjL366IATGZP3GJvP595838tUyE6/sAVhdely 9dM1tZueb3wHNVuFiyRO9WALTPfw8LC87YAv1cCJjbK3BPfxKxGGA91yxY9CzgbOJEuNSI1rlrlw oFoNHCMWhhHKc5hEXGlhBmenr91nDkMQI00shp/jIo8z7oML0z8LoZZw9g7OpR8K02elSLOvzTIW QOAV5kRrNKcxzvwlXDYbjQA1ugFPZLzs/SWUz1PehjciFTP81ui9q4WSwfOVqJY/Ra+7ny9oZ5LF meo93t/fp9WYTy5ClRWp3ytUvON5bBx60zzcxcOrZp9ZW9CmWKYXoEQ8cOyOjoQwDkRKBGtC+ZQv vDDLwljwXGpvkiV2j8VyrNn0B7lbSNb1nnmHzEQiEZqNuRbVkVtIjxy96TiwX6hHm/HfdKXCQ5y8 opkAtmzfqQe5nyiZm/rZlM94ueuAVpN7uYvOPvW6KwsSmXpTjCSyavGGv61O35feDaX/XSnqHOfe kkdZtla45x14e102VtkcUwz51O5tBb+lYR21dVDub+VtjFBg3T0IkpbxTKhYhpF5ELwg5jp6EKQa +Q+CRx3r4MGQnv4fpC0VvKV6b2YbTpt75DS22kAqMS5Cm9HYVAQ2IY1lZARWzx6rTl3acFEkV0Jr cUOtnWesGhDUmMmQqDu83dVxE4/y4desgAlPQQvs7ZHUIBY8ybHRz6WJcOwEgV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AAAAAA== --Apple-Mail-8--744102473 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii

<= /div>
Am 26.01.2012 um 19:28 schrieb Steve Craig:

Can you send me your code that = you used for the start page? The example jquery_ui_widget.html has = reference to Flash in the <script = tags...

<script type=3D"text/javascript" = src=3D"../../js/plupload.flash.js"></script>

=
and also in the...

runtimes : = 'flash,html5,browserplus,silverlight,gears,html4',

If I change the runtimes variable to just html5 for example, it all = works but I am back to random names, only works correctly if the = runtimes include flash. Maybe your code is different or you have a = different download to me?

Cheers
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
Steve Craig - Asylum Interactive Ltd
Tel +44 1330 860550 Fax +44 1330 860880
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
http://www.asylumweb.com
Skype: s.craig - iChat: steve.craig
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D



On 26 Jan 2012, at 17:54, Thierry Almy wrote:

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]
= [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]]
[/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 to
the mailing list <talk@webdna.us>.
To unsubscribe, E-mail to: <talk-leave@webdna.us>
archives: http://mail.webdna.us/l= ist/talk@webdna.us
Bug = 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

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us

--------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: archives: http://mail.webdna.us/l= ist/talk@webdna.us Bug Reporting: support@webdna.us
= --Apple-Mail-8--744102473-- --Apple-Mail-7--744102473-- Thierry Almy

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:

syntax question, not in online refernce (1997) Intermitent problem using [referrer] (1997) Strange intermittent WebDNA problems (2008) [WebDNA] User - Group - permissions (2009) writing checkboxes to a database (2000) Oops, my mistake - (was Bad suffix error) (1997) WebCat editing, SiteGuard & SiteEdit (1997) Re:quit command on NT (1997) wc 2 pro users - sites, quotes wanted (1997) Maybe off topic but how to charge (1997) ShowIf & CountChars (2000) problems with 2 tags shakur (1997) HUGE DATABASES (1998) Last digit of Credit Card Stripped (1997) WebTen Memory Error with Plug-In (1998) Re:Change WebDNA-Talk Mail due to no digest for 1wk (1997) PSC recommends what date format yr 2000??? (1997) RAM problems, [appendfile] problems (1998) HELP WITH DATES (1997) Code shows all, but should not (2003)