Re: [WebDNA] WebDNA AJAX_Fileuploader

This WebDNA talk-list message is from

2013


It keeps the original formatting.
numero = 110926
interpreted = N
texte = --Apple-Mail-AD6D2B62-3007-4AB9-980E-5450E501BCF5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, there was a bug in WebDNA apache .so file that wasn't allowing the conte= nt type setting. Does this script require XML? If so, it may be that. D. Brooke Mobile > On Nov 30, 2013, at 3:54 PM, Nices Lists wrote: >=20 > Hey Stuart, >=20 > Thanks.=20 >=20 > webDNA 6 Commerce Version=20 > WebSTAR V server > Mac OSX 10.2.8=20 >=20 > Well, eliminated the JSON syntax error, but ONLY when there is NO webDNA c= ode in the post_file.dna. (also changed suffix to .json - no difference) >=20 > otherwise, when webDNA code is in the file, I get the JSON syntax error.=20= >=20 > Get jQuery progress bar, and green check image that upload of image is com= plete,=20 >=20 > JSON output appears to validate, but webDNA will NOT write file, so NO upl= oad of any files.=20 >=20 > Seems webDNA is NOT recognizing webDNA code, and JSON parses webDNA code a= s a syntax error.=20 >=20 > Any ideas? >=20 > Thanks, >=20 > --Ravens >=20 >=20 >> On Nov 29, 2013, at 3:01 PM, Stuart Tremain wrote: >>=20 >> It could very well be a server issue where the server sees the file at te= xt/html not JSON. >>=20 >> A few options >>=20 >> 1 Ensure that your JSON output validates. >> 2. Make sure that is not at the top of your page >> 3. Remove any 'white space' from your file by commenting out line returns= in your WebDNA. >> 4. Force the server to accept the post_file.dna as a JSON file by adding [= SETMIMEHEADER name=3DContent-Type&value=3Dapplication/json] at the top of yo= ur template if a windows server. >> 5. Change the filename to .json and make sure that all your WebDNA & serv= er settings are correct. >> 6. If a linux server, alter webdna.conf add/alter this: >>=20 >> >> AddType text/html .tpl .dna ..newsuffix >> AddType application/json ..json >> >>=20 >> AddHandler webcatalog2-handler .tpl .tmpl .html .htm .dna ..json >>=20 >>=20 >>=20 >>=20 >> What platform is your WebDNA running on ? >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>> On 30 Nov 2013, at 5:43 am, Nices Lists wrote: >>>=20 >>> Hey All, >>>=20 >>> Been awhile since I have posted=E2=80=A6=20 >>>=20 >>> getting back on the bike after some years... >>>=20 >>> Not able to get WebDNA AJAX_Fileuploader to successfully upload image fi= les.=20 >>>=20 >>> Keep getting SyntaxError: JSON.parse: unexpected keyword in JS Console E= rrors panel. >>>=20 >>> I believe error is related to jQuery parsing the string from the webDNA= file - post_file.dna >>>=20 >>> [formvariables] >>> [Showif [URL][name][/URL]^pic][TEXT]_FILENAME=3D[MIDDLE startafter=3DCon= tent-Dispositionform-datanamepicfilename&endbefore=3DContent-Typeapplication= octet-stream][grep search=3D[URL][^a-zA-Z0-9\._+-][/URL]&replace=3D][NAME][/= grep][/MIDDLE][/TEXT][/showif] >>> [Showif [URL][name][/URL]^pic][WriteFile Secure=3DF&File=3Duploads/[_FIL= ENAME]][value][/WriteFile][/showif] >>> [/Formvariables] >>> {"status":"File was uploaded successfuly!"} >>>=20 >>> Anyone? >>>=20 >>> Thanks, >>>=20 >>> --Ravens >>>=20 >>>=20 >>>=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 Reporti= ng: support@webdna.us >=20 > --------------------------------------------------------- This message is s= ent 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-AD6D2B62-3007-4AB9-980E-5450E501BCF5 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi, there was a bug in WebDNA apache .= so file that wasn't allowing the content type setting. Does this script requ= ire XML? If so, it may be that.



D. Brooke M= obile

On Nov 30, 2013, at 3:54 PM, Nices Lists <ravens@nices.com> wrote:

Hey Stuart,

Thanks. 
<= div>
webDNA 6 Commerce Version 
WebSTAR V serve= r
Mac OSX  10.2.8 

Well, elimin= ated the JSON syntax error, but ONLY when there is NO webDNA code in th= e post_file.dna. (also changed suffix to .json - no difference)

otherwise, when webDNA code is in the file, I get the= JSON syntax error. 

Get jQuery progress b= ar, and green check image that upload of image is complete, 

JSON output appears to validate, but webDNA will NOT wr= ite file, so NO upload of any files. 

Seems we= bDNA is NOT recognizing webDNA code, and JSON parses webDNA code as a syntax= error. 

Any ideas?

T= hanks,

--Ravens


<= div>On Nov 29, 2013, at 3:01 PM, Stuart Tremain wrote:

It could very well be a server issue where the server sees the file at t= ext/html not JSON.

A few options

1 Ensure that your JSON output validates.
2. Make sure that = <!--HAS_W= EBDNA_TAGS--> is not at the top of your page
3. Rem= ove any 'white space' from your file by commenting out line returns in your W= ebDNA.
4. Force the server to accept the post_file.dna as a JSON f= ile by adding [SETMIMEHEADER name=3DContent-Type&value=3Dapplication/jso= n] at the top of your template if a windows server.
5. Change the f= ilename to .json and make sure that all your WebDNA & server settings ar= e correct.
6. If a linux server, alter webdna.conf add/alter this:=

<IfModule mime_module>
AddTyp= e text/html .tpl .dna ..newsuffix
AddType application/json ..json<= /div>
</IfModule>

AddHandler webcatalog2-= handler .tpl .tmpl .html .htm .dna ..json



What platform is your WebDNA runni= ng on ?






On 30 Nov 2013, at 5:43 am, Nices Lists <<= a href=3D"mailto:ravens@nices.com">ravens@nices.com> wrote:

Hey All,
Been awhile since I have posted=E2=80=A6

getting back on the bike a= fter some years...

Not able to get WebDNA AJAX_Fileuploader to succes= sfully upload image files.

Keep getting SyntaxError: JSON.parse: une= xpected keyword in JS Console Errors panel.

I believe error is relate= d to jQuery parsing the string from  the webDNA file -  post_file.= dna

[formvariables]
[Showif [URL][name][/URL]^pic][TEXT]_FILENAME=3D= [MIDDLE startafter=3DContent-Dispositionform-datanamepicfilename&endbefo= re=3DContent-Typeapplicationoctet-stream][grep search=3D[URL][^a-zA-Z0-9\._+= -][/URL]&replace=3D][NAME][/grep][/MIDDLE][/TEXT][/showif]
[Showif [U= RL][name][/URL]^pic][WriteFile Secure=3DF&File=3Duploads/[_FILENAME]][va= lue][/WriteFile][/showif]
[/Formvariables]
{"status":"File was uploade= d successfuly!"}

Anyone?

Thanks,

--Ravens


---------------------------------------------------------
This message i= s 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://mai= l.webdna.us/list/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/list/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/list/talk@webdna.us Bug Reporting: support@webdna.us= --Apple-Mail-AD6D2B62-3007-4AB9-980E-5450E501BCF5-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] WebDNA AJAX_Fileuploader (Nices Lists 2013)
  2. Re: [WebDNA] WebDNA AJAX_Fileuploader (WebDNA 2013)
  3. Re: [WebDNA] WebDNA AJAX_Fileuploader (Nices Lists 2013)
  4. Re: [WebDNA] WebDNA AJAX_Fileuploader (WebDNA 2013)
  5. Re: [WebDNA] WebDNA AJAX_Fileuploader (Donovan Brooke 2013)
  6. Re: [WebDNA] WebDNA AJAX_Fileuploader (Nices Lists 2013)
  7. Re: [WebDNA] WebDNA AJAX_Fileuploader (Donovan Brooke 2013)
  8. Re: [WebDNA] WebDNA AJAX_Fileuploader (Nices Lists 2013)
  9. Re: [WebDNA] WebDNA AJAX_Fileuploader (Stuart Tremain 2013)
  10. [WebDNA] WebDNA AJAX_Fileuploader (Nices Lists 2013)
--Apple-Mail-AD6D2B62-3007-4AB9-980E-5450E501BCF5 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, there was a bug in WebDNA apache .so file that wasn't allowing the conte= nt type setting. Does this script require XML? If so, it may be that. D. Brooke Mobile > On Nov 30, 2013, at 3:54 PM, Nices Lists wrote: >=20 > Hey Stuart, >=20 > Thanks.=20 >=20 > webDNA 6 Commerce Version=20 > WebSTAR V server > Mac OSX 10.2.8=20 >=20 > Well, eliminated the JSON syntax error, but ONLY when there is NO webDNA c= ode in the post_file.dna. (also changed suffix to .json - no difference) >=20 > otherwise, when webDNA code is in the file, I get the JSON syntax error.=20= >=20 > Get jQuery progress bar, and green check image that upload of image is com= plete,=20 >=20 > JSON output appears to validate, but webDNA will NOT write file, so NO upl= oad of any files.=20 >=20 > Seems webDNA is NOT recognizing webDNA code, and JSON parses webDNA code a= s a syntax error.=20 >=20 > Any ideas? >=20 > Thanks, >=20 > --Ravens >=20 >=20 >> On Nov 29, 2013, at 3:01 PM, Stuart Tremain wrote: >>=20 >> It could very well be a server issue where the server sees the file at te= xt/html not JSON. >>=20 >> A few options >>=20 >> 1 Ensure that your JSON output validates. >> 2. Make sure that is not at the top of your page >> 3. Remove any 'white space' from your file by commenting out line returns= in your WebDNA. >> 4. Force the server to accept the post_file.dna as a JSON file by adding [= SETMIMEHEADER name=3DContent-Type&value=3Dapplication/json] at the top of yo= ur template if a windows server. >> 5. Change the filename to .json and make sure that all your WebDNA & serv= er settings are correct. >> 6. If a linux server, alter webdna.conf add/alter this: >>=20 >> >> AddType text/html .tpl .dna ..newsuffix >> AddType application/json ..json >> >>=20 >> AddHandler webcatalog2-handler .tpl .tmpl .html .htm .dna ..json >>=20 >>=20 >>=20 >>=20 >> What platform is your WebDNA running on ? >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>> On 30 Nov 2013, at 5:43 am, Nices Lists wrote: >>>=20 >>> Hey All, >>>=20 >>> Been awhile since I have posted=E2=80=A6=20 >>>=20 >>> getting back on the bike after some years... >>>=20 >>> Not able to get WebDNA AJAX_Fileuploader to successfully upload image fi= les.=20 >>>=20 >>> Keep getting SyntaxError: JSON.parse: unexpected keyword in JS Console E= rrors panel. >>>=20 >>> I believe error is related to jQuery parsing the string from the webDNA= file - post_file.dna >>>=20 >>> [formvariables] >>> [Showif [url][name][/URL]^pic][text]_FILENAME=3D[MIDDLE startafter=3DCon= tent-Dispositionform-datanamepicfilename&endbefore=3DContent-Typeapplication= octet-stream][grep search=3D[url][^a-zA-Z0-9\._+-][/URL]&replace=3D][NAME][/= grep][/MIDDLE][/TEXT][/showif] >>> [Showif [url][name][/URL]^pic][WriteFile Secure=3DF&File=3Duploads/[_FIL= ENAME]][value][/WriteFile][/showif] >>> [/Formvariables] >>> {"status":"File was uploaded successfuly!"} >>>=20 >>> Anyone? >>>=20 >>> Thanks, >>>=20 >>> --Ravens >>>=20 >>>=20 >>>=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 Reporti= ng: support@webdna.us >=20 > --------------------------------------------------------- This message is s= ent 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-AD6D2B62-3007-4AB9-980E-5450E501BCF5 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi, there was a bug in WebDNA apache .= so file that wasn't allowing the content type setting. Does this script requ= ire XML? If so, it may be that.



D. Brooke M= obile

On Nov 30, 2013, at 3:54 PM, Nices Lists <ravens@nices.com> wrote:

Hey Stuart,

Thanks. 
<= div>
webDNA 6 Commerce Version 
WebSTAR V serve= r
Mac OSX  10.2.8 

Well, elimin= ated the JSON syntax error, but ONLY when there is NO webDNA code in th= e post_file.dna. (also changed suffix to .json - no difference)

otherwise, when webDNA code is in the file, I get the= JSON syntax error. 

Get jQuery progress b= ar, and green check image that upload of image is complete, 

JSON output appears to validate, but webDNA will NOT wr= ite file, so NO upload of any files. 

Seems we= bDNA is NOT recognizing webDNA code, and JSON parses webDNA code as a syntax= error. 

Any ideas?

T= hanks,

--Ravens


<= div>On Nov 29, 2013, at 3:01 PM, Stuart Tremain wrote:

It could very well be a server issue where the server sees the file at t= ext/html not JSON.

A few options

1 Ensure that your JSON output validates.
2. Make sure that = <!--HAS_W= EBDNA_TAGS--> is not at the top of your page
3. Rem= ove any 'white space' from your file by commenting out line returns in your W= ebDNA.
4. Force the server to accept the post_file.dna as a JSON f= ile by adding [SETMIMEHEADER name=3DContent-Type&value=3Dapplication/jso= n] at the top of your template if a windows server.
5. Change the f= ilename to .json and make sure that all your WebDNA & server settings ar= e correct.
6. If a linux server, alter webdna.conf add/alter this:=

<IfModule mime_module>
AddTyp= e text/html .tpl .dna ..newsuffix
AddType application/json ..json<= /div>
</IfModule>

AddHandler webcatalog2-= handler .tpl .tmpl .html .htm .dna ..json



What platform is your WebDNA runni= ng on ?






On 30 Nov 2013, at 5:43 am, Nices Lists <<= a href=3D"mailto:ravens@nices.com">ravens@nices.com> wrote:

Hey All,
Been awhile since I have posted=E2=80=A6

getting back on the bike a= fter some years...

Not able to get WebDNA AJAX_Fileuploader to succes= sfully upload image files.

Keep getting SyntaxError: JSON.parse: une= xpected keyword in JS Console Errors panel.

I believe error is relate= d to jQuery parsing the string from  the webDNA file -  post_file.= dna

[formvariables]
[Showif [url][name][/URL]^pic][text]_FILENAME=3D= [MIDDLE startafter=3DContent-Dispositionform-datanamepicfilename&endbefo= re=3DContent-Typeapplicationoctet-stream][grep search=3D[url][^a-zA-Z0-9\._+= -][/URL]&replace=3D][NAME][/grep][/MIDDLE][/TEXT][/showif]
[Showif [U= RL][name][/URL]^pic][WriteFile Secure=3DF&File=3Duploads/[_FILENAME]][va= lue][/WriteFile][/showif]
[/Formvariables]
{"status":"File was uploade= d successfuly!"}

Anyone?

Thanks,

--Ravens


---------------------------------------------------------
This message i= s 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://mai= l.webdna.us/list/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/list/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/list/talk@webdna.us Bug Reporting: support@webdna.us= --Apple-Mail-AD6D2B62-3007-4AB9-980E-5450E501BCF5-- Donovan Brooke

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:

Macauth: Dates and No Scripting... (1997) Generating Report Totals (1997) Limit to Field Length in DB (1998) did I miss anything (1997) Email Obfuscation Function (2008) RE:It just Does't add up!!! (1997) AutoCommit Preference? (1998) WebCat2 several catalogs? (1997) List Archives (2000) Need relative path explanation (1997) WebCat2 - Getting to the browser's username/password data (1997) Re:2nd WebCatalog2 Feature Request (1996) [WebDNA] Secure Cookies (2020) Today's silly question is... (2007) [WebDNA] Google Map Mashup available at webdna.us (2010) greater than or equal to (1997) Huge databases and RAM (1998) Wanted: More Math Functions (or, Can You Solve This?) (1997) WebTen and WebCat (1997) Bad Cookie / Internet Option / Internet Explorer (2004)