Re: [WebDNA] WebDNA AJAX_Fileuploader

This WebDNA talk-list message is from

2013


It keeps the original formatting.
numero = 110917
interpreted = N
texte = --Apple-Mail=_3414B886-CDD8-40F7-8955-0184C40D021C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 It could very well be a server issue where the server sees the file at = text/html not JSON. A few options 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 your template if a windows server. 5. Change the filename to .json and make sure that all your WebDNA & = server settings are correct. 6. If a linux server, alter webdna.conf add/alter this: AddType text/html .tpl .dna .newsuffix AddType application/json .json AddHandler webcatalog2-handler .tpl .tmpl .html .htm .dna .json What platform is your WebDNA running on ? On 30 Nov 2013, at 5:43 am, Nices Lists wrote: > Hey All, >=20 > Been awhile since I have posted=85=20 >=20 > getting back on the bike after some years... >=20 > Not able to get WebDNA AJAX_Fileuploader to successfully upload image = files.=20 >=20 > Keep getting SyntaxError: JSON.parse: unexpected keyword in JS Console = Errors 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=3DContent-Dispositionform-datanamepicfilename&endbefore=3DConte= nt-Typeapplicationoctet-stream][grep = search=3D[URL][^a-zA-Z0-9\._+-][/URL]&replace=3D][NAME][/grep][/MIDDLE][/T= EXT][/showif] > [Showif [URL][name][/URL]^pic][WriteFile = Secure=3DF&File=3Duploads/[_FILENAME]][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 --Apple-Mail=_3414B886-CDD8-40F7-8955-0184C40D021C Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 It = could very well be a server issue where the server sees the file at = text/html not JSON.

A few = options

1 Ensure that your JSON output = validates.
2. Make sure that <!--HAS_WEBDNA_TAGS--> 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 your template if a windows server.
5. Change the = filename to .json and make sure that all your WebDNA & server = settings are correct.
6. If a linux server, alter webdna.conf = add/alter this:

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

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




What platform is your WebDNA running on = ?





On 30 Nov 2013, at 5:43 am, Nices Lists = <ravens@nices.com> = wrote:

Hey All,

Been awhile since I have posted=85 =

getting back on the bike after some years...

Not able to = get WebDNA AJAX_Fileuploader to successfully upload image files. =

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

I believe error is related 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&endbefore=3DC= ontent-Typeapplicationoctet-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/[_FILENAME]][value][/WriteFile][/showif]
= [/Formvariables]
{"status":"File was uploaded = successfuly!"}

Anyone?

Thanks,

--Ravens


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

= --Apple-Mail=_3414B886-CDD8-40F7-8955-0184C40D021C-- 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=_3414B886-CDD8-40F7-8955-0184C40D021C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 It could very well be a server issue where the server sees the file at = text/html not JSON. A few options 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 your template if a windows server. 5. Change the filename to .json and make sure that all your WebDNA & = server settings are correct. 6. If a linux server, alter webdna.conf add/alter this: AddType text/html .tpl .dna .newsuffix AddType application/json .json AddHandler webcatalog2-handler .tpl .tmpl .html .htm .dna .json What platform is your WebDNA running on ? On 30 Nov 2013, at 5:43 am, Nices Lists wrote: > Hey All, >=20 > Been awhile since I have posted=85=20 >=20 > getting back on the bike after some years... >=20 > Not able to get WebDNA AJAX_Fileuploader to successfully upload image = files.=20 >=20 > Keep getting SyntaxError: JSON.parse: unexpected keyword in JS Console = Errors 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=3DContent-Dispositionform-datanamepicfilename&endbefore=3DConte= nt-Typeapplicationoctet-stream][grep = search=3D[url][^a-zA-Z0-9\._+-][/URL]&replace=3D][NAME][/grep][/MIDDLE][/T= EXT][/showif] > [Showif [url][name][/URL]^pic][WriteFile = Secure=3DF&File=3Duploads/[_FILENAME]][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 --Apple-Mail=_3414B886-CDD8-40F7-8955-0184C40D021C Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=windows-1252 It = could very well be a server issue where the server sees the file at = text/html not JSON.

A few = options

1 Ensure that your JSON output = validates.
2. Make sure that <!--HAS_WEBDNA_TAGS--> 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 your template if a windows server.
5. Change the = filename to .json and make sure that all your WebDNA & server = settings are correct.
6. If a linux server, alter webdna.conf = add/alter this:

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

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




What platform is your WebDNA running on = ?





On 30 Nov 2013, at 5:43 am, Nices Lists = <ravens@nices.com> = wrote:

Hey All,

Been awhile since I have posted=85 =

getting back on the bike after some years...

Not able to = get WebDNA AJAX_Fileuploader to successfully upload image files. =

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

I believe error is related 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&endbefore=3DC= ontent-Typeapplicationoctet-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/[_FILENAME]][value][/WriteFile][/showif]
= [/Formvariables]
{"status":"File was uploaded = successfuly!"}

Anyone?

Thanks,

--Ravens


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

= --Apple-Mail=_3414B886-CDD8-40F7-8955-0184C40D021C-- Stuart Tremain

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:

Re:WebCatalog f2 Installation (1997) Too Many Items found (2000) Authenticate (1997) authenticating a second user (1997) WebMerchant 1.6 and https (1997) WebCat2b13MacPlugin - nested [xxx] contexts (1997) WebCat2b13MacPlugIn - More limits on [include] (1997) Re:What file? (1997) Encrypt question. (2000) dbQuickView 2.0 - something related (2005) Protect (1997) Append (1999) when is date system date or order date? (1997) New Site Announcement (1998) Questions about maximum (1999) Passing Variables.. yikes, I'm dumb (2000) searchable list archive (1997) lineitems context in sendmail context (1998) problems with 2 tags (1997) [WebDNA] Terminate all threads (2010)