It could very well be a server issue where the server sees the file at t=ext/html not JSON.---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing listA few options1 Ensure that your JSON output validates.2. Make sure that =<!--HAS_W=EBDNA_TAGS--> is not at the top of your page3. 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 ..newsuffixAddType application/json ..json<=/div></IfModule>AddHandler webcatalog2-=handler .tpl .tmpl .html .htm .dna ..jsonWhat 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.To unsubscribe, E-mail to: archives: http://mail.=webdna.us/list/talk@webdna.usBug Reporting: support@webdna.us
|
It could very well be a server issue where the server sees the file at t=ext/html not JSON.---------------------------------------------------------This message is sent to you because you are subscribed tothe mailing listA few options1 Ensure that your JSON output validates.2. Make sure that =<!--HAS_W=EBDNA_TAGS--> is not at the top of your page3. 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 ..newsuffixAddType application/json ..json<=/div></IfModule>AddHandler webcatalog2-=handler .tpl .tmpl .html .htm .dna ..jsonWhat 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.To unsubscribe, E-mail to: archives: http://mail.=webdna.us/list/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...