Re: [WebDNA] Froala Editor working with WebDNA

This WebDNA talk-list message is from

2016


It keeps the original formatting.
numero = 113255
interpreted = N
texte = 843 --Apple-Mail=_61AB15CB-24BE-44B8-B0C5-BCFC7E3E68C7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Palle I will have a look tomorrow for you. Kind regards Stuart Tremain Pharoah Lane Software AUSTRALIA webdna@idfk.com.au > On 18 Dec 2016, at 00:29, Palle Bo Nielsen = wrote: >=20 > Hi Stuaty >=20 > Thanks for your interest. >=20 > Ok, let me repeat the baseline just make sure we do not misunderstand = the setup. >=20 > I have made test page which uses the Froala framework with the aim of = using the function of drag=E2=80=99n=E2=80=99drop and image into the = TextArea field, only to be catched/saved Server Side and presented = Client Side as per the concept of Froala. I need this solution on my = next website which is currently under development. So basically WebDNA = as Server Side and Froala as Client Side. >=20 > You will find my test set up at the follow URL (id: a - pswd: a) >=20 > http://qt.dk/dev/froala/image/ >=20 > Information about the Froala client is here (wysiwyg html editor) >=20 > https://www.froala.com/wysiwyg-editor/ >=20 > But more important. Information about the Image drag=E2=80=99n=E2=80=99d= rop into Textarea her=E2=80=A6 >=20 > https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload >=20 > You suggested to include a [FormVariables =E2=80=A6] on the page. I = already did and therefor you can already find debug information at the = bottom of the page (qt.dk =E2=80=A6) >=20 > So the actual Froala Framework is setup and it works. M=C3=BD = challenge is to get the drag=E2=80=99ndrop image into textarea to work. = I am not sure how to catch the file from the Froala framework to start = with. Maybe I already did but again then I do not know how to store it = (save) server side. >=20 > I would really appreciate some guidance to get this working and I will = make sure the final result will be shared within the webdna community as = well as webdna.us and froala.com. >=20 > You also mention that =E2=80=9C...=46rom what I see in the script, the = receiving url for the file is: imageUploadURL: '/upload_image=E2=80=99, = =E2=80=A6=E2=80=9D. You might look at the wrong place as the = ImageUploadUrl is: "/dev/froala/image" >=20 > /Palle >=20 >=20 >=20 >> On 15 Dec 2016, at 23.15, Stuart Tremain wrote: >>=20 >> Hi Palle >>=20 >> Thanks for the link, now I can see what is going on. >>=20 >> =46rom what I see in the script, the receiving url for the file is:=20= >>=20 >> // Set the image upload URL. >>=20 >> imageUploadURL >> : '/upload_image', >>=20 >>=20 >> If you put [FormVariables = name=3D&exact=3DF][name]=3D[value]
[/FormVariables] on this page and = then post the results, I will be able to see what is going on, you can = do this by looking at the XHRs results in your browser. >>=20 >>=20 >>=20 >>=20 >> Kind regards >>=20 >> Stuart Tremain >> Pharoah Lane Software >> AUSTRALIA >> webdna@idfk.com.au >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>> On 16 Dec 2016, at 07:25, Palle Bo Nielsen = wrote: >>>=20 >>> Hi Stuart >>>=20 >>> Please stop me if am using to much of your time, but=E2=80=A6 >>>=20 >>> First of all. If I understand your code correctly then it assumes = that a formvariable exist by the name of <=E2=80=9C_UPLOADEDFILENAME=E2=80= =9D> (your example), in my case it should be <=E2=80=9Cfile_name=E2=80=9D>= hence the =E2=80=98imageUploadParam=E2=80=99 which is set in the JS = code. >>>=20 >>> https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload >>>=20 >>> But the [formvariables=E2=80=A6] does not result in any variable by = that name or any other which is relevant for this proces which leaves me = in a situation where I have nothing to catch from the JS/Image File = supposedly being uploaded. >>>=20 >>> I think I understand the rest of the code but it is a prerequisite = than the formvariable is being identified and catched, right? >>>=20 >>> /Palle >>>=20 >>>=20 >>>=20 >>>> On 14 Dec 2016, at 21.52, Stuart Tremain = wrote: >>>>=20 >>>> Hi Palle >>>>=20 >>>> You will find that the file is being uploaded in a = multipart/form-data form, therefore you need to deal with the contents = in a different way rather than as name valued pairs. >>>>=20 >>>> Try this to capture the file name and it=E2=80=99s contents, I have = pulled it out of some working code: >>>>=20 >>>> [TEXT]UPLOAD-DIRECTORY=3D../../pdfuploads/pdf-files[/TEXT] >>>>=20 >>>>=20 >>>> [FORMVARIABLES name=3D_UPLOADEDFILENAME&exact=3DF] >>>> [HIDEIF [URL][value][/URL]=3D] >>>> [SHOWIF [url][name][/url]^[url]name=3D"[/url]] >>>> [HIDEIF [url][name][/url]^[url]filename=3D"[/url]]= >>>> [TEXT][MIDDLE = StartAfter=3Dname=3D"&endbefore=3D"][name][/MIDDLE]=3D[value][/TEXT] >>>> [/HIDEIF] >>>> [/SHOWIF] >>>> [SHOWIF [url][name][/url]^[url]filename=3D"[/url]] >>>> [TEXT]FULLFILENAME=3D[MIDDLE = StartAfter=3Dfilename=3D"&endbefore=3D"][name][/MIDDLE][/TEXT] >>>> [listwords words=3D[FULLFILENAME]&delimiters=3D:/\= ] >>>> = [TEXT]THISFILENAME=3D[LOWERCASE][convertchars = db=3D^noillegals.db][word][/convertchars][/LOWERCASE][/TEXT] >>>> [/listwords] >>>> [!]-------------- write the file to = [UPLOAD-DIRECTORY] --------------[/!] >>>> [SHOWIF [FULLFILENAME]=3D] >>>> [TEXT]UPLOADMESSAGE=3DNo file was chosen = to upload.[/TEXT] >>>> [/SHOWIF] >>>> [HIDEIF [FULLFILENAME]=3D] >>>> [WRITEFILE = Secure=3DF&file=3D[UPLOAD-DIRECTORY]/[THISFILENAME]][value][/WRITEFILE] >>>> [TEXT]UPLOADMESSAGE=3D[THISFILENAME] was = added to the pdf-files directory.[/TEXT] >>>> [/HIDEIF] >>>> [/SHOWIF] >>>> [/HIDEIF] >>>> [/FORMVARIABLES] >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>> noillegals.db file contents: >>>>=20 >>>> fromto >>>> _ >>>> #=09 >>>> @=09 >>>> ,=09 >>>> ;=09 >>>> $=09 >>>> !=09 >>>> /=09 >>>> \=09 >>>> :=09 >>>> +=09 >>>> +=09 >>>> *=09 >>>> (=09 >>>> )=09 >>>> &=09 >>>> ^=09 >>>> %=09 >>>> <=09 >>>>> =09 >>>> ~=09 >>>> `=09 >>>> [=09 >>>> ]=09 >>>> {=09 >>>> }=09 >>>> "=09 >>>> '=09 >>>> ?=09 >>>> =3D=09 >>>> _ >>>> = =E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2= =80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80= =93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93= END OF = FILE=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93= =E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2= =80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80= =93 >>>>=20 >>>>=20 >>>>=20 >>>> Kind regards >>>>=20 >>>> Stuart Tremain >>>> Pharoah Lane Software >>>> AUSTRALIA >>>> webdna@idfk.com.au >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>>> On 15 Dec 2016, at 04:26, Palle Bo Nielsen = wrote: >>>>>=20 >>>>> Hi Tom >>>>>=20 >>>>> Thanks for the tip. It gave me the name of the file and the file = type but not the actual file content. >>>>>=20 >>>>> So why is it that I am able to get this data within a = sendmail/lformvariables context when I can not get it without the the = sendmail? >>>>>=20 >>>>> /Palle >>>>>=20 >>>>>=20 >>>>>> On 14 Dec 2016, at 16.08, Tom Duke = wrote: >>>>>>=20 >>>>>> Palle, >>>>>>=20 >>>>>> Set your 'imageUploadURL' to a WedDNA page. >>>>>>=20 >>>>>> Then on that page add a [sendmail] to yourself with a = [formvariables] in the body of the email: >>>>>>=20 >>>>>> [sendmail = to=3Dmyemail@email.com&from=3Dfroala@email.com&subject=3DFroala Editor = Upload Params] >>>>>>=20 >>>>>> [formvariables][name]:[value]
>>>>>> [/formvariables] >>>>>>=20 >>>>>> [/sendmail] >>>>>>=20 >>>>>> That will show you what data is being passed by the editor. You = should then be able to parse and deal with it. You *might* need to = change the 'imageUploadMethod' to 'post'. >>>>>>=20 >>>>>> There is info in the archives on how to deal with image uploads = (i.e http://webdna.us/page.dna?numero=3D58031). >>>>>>=20 >>>>>> - Tom >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>> =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=3D=3D=3D=3D=3D=3D >>>>>> Digital Revolutionaries >>>>>> 1st Floor, Castleriver House >>>>>> 14-15 Parliament Street >>>>>> Temple Bar,Dublin 2 >>>>>> Ireland >>>>>> ---------------------------------------------- >>>>>> [t]: + 353 1 4403907 >>>>>> [e]: >>>>>> [w]: >>>>>> =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=3D=3D=3D=3D=3D=3D >>>>>>=20 >>>>>> On 14 December 2016 at 11:06, Palle Bo Nielsen = wrote: >>>>>> So I stated a project page where a lot is running as it should. >>>>>>=20 >>>>>> Current problem is that I need to make the form accept the = drag/drop image into the Textarea form which is supported by Froala. It = depends on some JS code=E2=80=A6 >>>>>>=20 >>>>>> imageUploadParam: 'file_name', >>>>>> imageUploadURL: '/dev/froala/image', >>>>>> imageUploadMethod: 'PUT', >>>>>> imageMaxSize: 1024 * 1024 * 3, >>>>>> imageAllowedTypes: ['jpeg', 'jpg', 'png'], >>>>>> =09 >>>>>> How can i extract the =E2=80=9CimageUploadParam=E2=80=9D into = WebDNA and how do I catch and store it=E2=80=A6? >>>>>>=20 >>>>>> =E2=80=9C...The upload flow for the image is quite simple and it = is explained here: = https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload. First = of all you have to tell the editor where to make the upload request = (imageUploadURL). Then, your server should catch the request, store the = image and then return a response in JSON format that looks like this: { = link: 'path/to/image.jpg' }=E2=80=A6" >>>>>>=20 >>>>>> If you have anything to add/contribute or just being helpful then = visits http://www.qt.dk/dev/froala/image/ (id and pass is lowercase = =E2=80=98a=E2=80=99). >>>>>>=20 >>>>>> /Palle >>>>>>=20 >>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>>> On 17 Nov 2016, at 07.55, Stuart Tremain = wrote: >>>>>>>>=20 >>>>>>>> Hey Palle >>>>>>>>=20 >>>>>>>> I had a bit of a look at this, it seems that Froala want a JSON = response: such as = {"link":"https://i.froala.com/download/6143ec97622356aaeb01df3b648b11a0f31= 76636.jpg?1479365089=E2=80=9D} >>>>>>>>=20 >>>>>>>> You can see this by viewing what the AJAX is returning. >>>>>>>>=20 >>>>>>>> I did have a bit of trouble making JSON work properly on a = server a while ago, the response needs to be handled properly through = Apache & webdna without any spaces at the beginning. If you have = problems, I will have a dig around for what I did to fix it for a system = that I developed. >>>>>>>>=20 >>>>>>>>=20 >>>>>>>>=20 >>>>>>>> Kind regards >>>>>>>>=20 >>>>>>>> Stuart Tremain >>>>>>>> Pharoah Lane Software >>>>>>>> AUSTRALIA >>>>>>>> webdna@idfk.com.au >>>>>>>>=20 >>>>>>>>=20 >>>>>>>>=20 >>>>>>>>=20 >>>>>>>>=20 >>>>>>>>=20 >>>>>>>>> On 7 Nov. 2016, at 02:15, Palle Bo Nielsen = wrote: >>>>>>>>>=20 >>>>>>>>> Evening all >>>>>>>>>=20 >>>>>>>>> Some of you might know the Froala Javascript Editor which in = my opinion is a great editor. The editor enabled a lot of function = within a textarea which for me works great. One of the function where I = have not been able to make it work is the the image function where you = can drag and drop an image to the textarea - the image is being uploaded = and displayed in the textarea. The reason for me not being able to make = it work is that the Froala Editor expects some handling server side and = I can not figure it out. The great thing is that I have WebDNA to = provide me with the server side stuff; the bad thing is that I can not = see what is needed. >>>>>>>>>=20 >>>>>>>>> = https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload >>>>>>>>>=20 >>>>>>>>> Any care to join me in making it happen? >>>>>>>>>=20 >>>>>>>>> The result could be used by Froala as an official WebDNA SDK = just as an PHP has been published. This could benefit the WebDNA = community. >>>>>>>>>=20 >>>>>>>>> https://www.froala.com/wysiwyg-editor >>>>>>>>>=20 >>>>>>>>> https://www.froala.com/wysiwyg-editor/docs >>>>>>>>>=20 >>>>>>>>> I hope for a positive response :) >>>>>>>>>=20 >>>>>>>>> /Palle >>>>>>>>>=20 >>>>>>>>>=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 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 >>>>>=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 >>=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=_61AB15CB-24BE-44B8-B0C5-BCFC7E3E68C7 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi Palle

I = will have a look tomorrow for you.


Kind regards

Stuart Tremain
Pharoah Lane Software
AUSTRALIA






On 18 Dec 2016, at 00:29, Palle Bo Nielsen <powerpalle@powerpalle.dk> wrote:

Hi = Stuaty

Thanks for your interest.

Ok, let me repeat the baseline just make sure = we do not misunderstand the setup.

I have = made test page which uses the Froala framework with the aim of using the = function of drag=E2=80=99n=E2=80=99drop and image into the TextArea = field, only to be catched/saved Server Side and presented Client Side as = per the concept of Froala. I need this solution on my next website which = is currently under development. So basically WebDNA as Server Side and = Froala as Client Side.

You will find my = test set up at the follow URL (id: a - pswd: a)

http://qt.dk/dev/froala/image/

Information about the Froala client is here (wysiwyg html = editor)

https://www.froala.com/wysiwyg-editor/

But more important. Information about the Image = drag=E2=80=99n=E2=80=99drop into Textarea her=E2=80=A6

https://www.froala.com/wysiwyg-editor/docs/concepts/image/uploa= d

You suggested to include a [FormVariables = =E2=80=A6] on the page. I already did and therefor you can already find = debug information at the bottom of the page (qt.dk =E2=80=A6)

So the actual Froala Framework is setup and it = works. M=C3=BD challenge is to get the drag=E2=80=99ndrop image into = textarea to work. I am not sure how to catch the file from the Froala = framework to start with. Maybe I already did but again then I do not = know how to store it (save) server side.

I = would really appreciate some guidance to get this working and I will = make sure the final result will be shared within the webdna community as = well as webdna.us and froala.com.

You also = mention that =E2=80=9C...=46rom what I see in the script, the receiving = url for the file is: imageUploadURL: '/upload_image=E2=80=99, =E2=80=A6=E2= =80=9D. You might look at the wrong place as the ImageUploadUrl is: = "/dev/froala/image"

/Palle



On 15 Dec 2016, at 23.15, Stuart Tremain = <webdna@idfk.com.au> wrote:

Hi = Palle

Thanks for the link, now I can see = what is going on.

=46rom what I see in the = script, the receiving url for the file is:

= // Set the image upload URL.

=        imageUploadURL
: = '/upload_image',


If you put = [FormVariables = name=3D&exact=3DF][name]=3D[value]<br>[/FormVariables] on this = page and then post the results, I will be able to see what is going on, = you can do this by looking at the XHRs results in your browser.




Kind regards

Stuart Tremain
Pharoah Lane Software
AUSTRALIA
webdna@idfk.com.au






On 16 Dec 2016, at = 07:25, Palle Bo Nielsen <powerpalle@powerpalle.dk> wrote:

Hi Stuart

Please = stop me if  am using to much of your time, but=E2=80=A6

First of all. If I understand your code = correctly then it assumes that a formvariable exist by the name of = <=E2=80=9C_UPLOADEDFILENAME=E2=80=9D> (your example), in my case = it should be <=E2=80=9Cfile_name=E2=80=9D> hence the = =E2=80=98imageUploadParam=E2=80=99 which is set in the JS code.

https://www.froala.com/wysiwyg-editor/docs/concepts/image/uploa= d

But the [formvariables=E2=80=A6] does not = result in any variable by that name or any other which is relevant for = this proces which leaves me in a situation where I have nothing to catch = from the JS/Image File supposedly being uploaded.

I think I understand the rest of the code but it is a = prerequisite than the formvariable is being identified and catched, = right?

/Palle



On 14 Dec 2016, at 21.52, Stuart Tremain = <webdna@idfk.com.au> wrote:

Hi = Palle

You will find that the file is being = uploaded in a multipart/form-data form, therefore you need to deal with = the contents in a different way rather than as name valued pairs.

Try this to capture the file name and it=E2=80=99= s contents, I have pulled it out of some working code:

[TEXT]UPLOAD-DIRECTORY=3D../../pdfuploads/pdf-files[/TEXT]


[FORMVARIABLES = name=3D_UPLOADEDFILENAME&exact=3DF]
[HIDEIF = [URL][value][/URL]=3D]
[SHOWIF = [url][name][/url]^[url]name=3D"[/url]]
[HIDEIF = [url][name][/url]^[url]filename=3D"[/url]]
= [TEXT][MIDDLE = StartAfter=3Dname=3D"&endbefore=3D"][name][/MIDDLE]=3D[value][/TEXT]= = = [/HIDEIF]
[/SHOWIF]
[SHOWIF = [url][name][/url]^[url]filename=3D"[/url]]
= [TEXT]FULLFILENAME=3D[MIDDLE = StartAfter=3Dfilename=3D"&endbefore=3D"][name][/MIDDLE][/TEXT]
= = = [listwords words=3D[FULLFILENAME]&delimiters=3D:/\]
= = = = [TEXT]THISFILENAME=3D[LOWERCASE][convertchars = db=3D^noillegals.db][word][/convertchars][/LOWERCASE][/TEXT]
= = = [/listwords]
[!]-------------- write the file = to [UPLOAD-DIRECTORY] --------------[/!]
[SHOWIF = [FULLFILENAME]=3D]
[TEXT]UPLOADMESSAGE=3DNo file was = chosen to upload.[/TEXT]
[/SHOWIF]
[HIDEIF = [FULLFILENAME]=3D]
[WRITEFILE = Secure=3DF&file=3D[UPLOAD-DIRECTORY]/[THISFILENAME]][value][/WRITEFILE= ]
= = = = [TEXT]UPLOADMESSAGE=3D[THISFILENAME] was added to the pdf-files = directory.[/TEXT]
[/HIDEIF]
= [/SHOWIF]
[/HIDEIF]
[/FORMVARIABLES]




noillegals.db file contents:

fromto
_
#=
@
,
;=
$
!
/=
\
:
+=
+
*
(=
)
&
^=
%
<

~
`
[=
]
{
}=
"
'
?=
=3D
_
=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93= =E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2= =80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80= =93=E2=80=93END OF = FILE=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93= =E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2= =80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80= =93



Kind = regards

Stuart Tremain
Pharoah = Lane Software
AUSTRALIA
webdna@idfk.com.au





On 15 = Dec 2016, at 04:26, Palle Bo Nielsen <powerpalle@powerpalle.dk> = wrote:

Hi Tom

Thanks for the tip. It gave me the name of the file and the = file type but not the actual file content.

So= why is it that I am able to get this data within a = sendmail/lformvariables context when I can not get it without the the = sendmail?

/Palle


On 14 Dec = 2016, at 16.08, Tom Duke <tom@revolutionaries.ie> wrote:

Palle,

Set your = 'imageUploadURL' to a WedDNA page.

Then on = that page add a [sendmail] to yourself with a [formvariables] in the = body of the email:

[sendmail = to=3Dmyemail@email.com&from=3Dfroala@email.com&subject=3DFroala = Editor Upload Params]

[formvariables][name]:[value]<br />
[/formvariables]

[/sendmail]

That will show you what data is being passed = by the editor.  You should then be able to parse and deal with it. = You *might* need to change the 'imageUploadMethod' to 'post'.

There is info in the archives on how to deal = with image uploads (i.e http://webdna.us/page.dna?numero=3D58031).

- Tom




=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=3D=3D=3D=3D=3D=3D=
Digital Revolutionaries
1st Floor, = Castleriver House
14-15 Parliament Street
Temple Bar,Dublin 2
Ireland
----------------------------------------------
[t]: + 353 1 4403907
[e]: = <mailto:tom@revolutionaries.ie>
[w]: = <http://www.revolutionaries.ie/>
=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=3D=3D=3D=3D=3D=3D=

On 14 December 2016 at 11:06, Palle Bo = Nielsen <powerpalle@powerpalle.dk> wrote:
So I = stated a project page where a lot is running as it should.

Current problem is that I need to make the = form accept the drag/drop image into the Textarea form which is = supported by Froala. It depends on some JS code=E2=80=A6
= imageUploadParam: 'file_name',
= imageUploadURL: '/dev/froala/image',
= imageUploadMethod: 'PUT',
= imageMaxSize: 1024 * 1024 * 3,
= imageAllowedTypes: ['jpeg', 'jpg', 'png'],

How can i extract the =E2=80=9CimageUploadParam=E2=80=9D into = WebDNA and how do I catch and store it=E2=80=A6?

=E2=80=9C...The upload flow for the image is quite simple and = it is explained here: = https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload. First = of all you have to tell the editor where to make the upload request = (imageUploadURL). Then, your server should catch the request, store the = image and then return a response in JSON format that looks like this: { = link: 'path/to/image.jpg' }=E2=80=A6"

If = you have anything to add/contribute or just being helpful then visits = http://www.qt.dk/dev/froala/image/ (id and pass is lowercase = =E2=80=98a=E2=80=99).

/Palle






On 17 Nov 2016, at = 07.55, Stuart Tremain <webdna@idfk.com.au> wrote:

Hey Palle

I had a bit of a look = at this, it seems that Froala want a JSON response: such as = {"link":"https://i.froala.com/download/6143ec97622356aaeb01df3b648b11a0f31= 76636.jpg?1479365089=E2=80=9D}

You can see = this by viewing what the AJAX is returning.

I= did have a bit of trouble making JSON work properly on a server a while = ago, the response needs to be handled properly through Apache & = webdna without any spaces at the beginning. If you have problems, I will = have a dig around for what I did to fix it for a system that I = developed.



Kind= regards

Stuart Tremain
Pharoah= Lane Software
AUSTRALIA
webdna@idfk.com.au





On 7 Nov. 2016, at 02:15, Palle Bo Nielsen = <powerpalle@powerpalle.dk> wrote:

Evening all

Some of you might = know the Froala Javascript Editor which in my opinion is a great editor. = The editor enabled a lot of function within a textarea which for me = works great. One of the function where I have not been able to make it = work is the the image function where you can drag and drop an image to = the textarea - the image is being uploaded and displayed in the = textarea. The reason for me not being able to make it work is that the = Froala Editor expects some handling server side and I can not figure it = out. The great thing is that I have WebDNA to provide me with the server = side stuff; the bad thing is that I can not see what is needed.

https://www.froala.com/wysiwyg-editor/docs/concepts/image/uploa= d

Any care to join me in making it = happen?

The result could be used by Froala = as an official WebDNA SDK just as an PHP has been published. This could = benefit the WebDNA community.

https://www.froala.com/wysiwyg-editor

https://www.froala.com/wysiwyg-editor/docs

I hope for a positive response :)

/Palle




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

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

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

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

--------------------------------------------------------- = 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 <talk@webdna.us>.
To = unsubscribe, E-mail to: <talk-leave@webdna.us>
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=_61AB15CB-24BE-44B8-B0C5-BCFC7E3E68C7-- . Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] Froala Editor working with WebDNA (Stuart Tremain 2016)
  2. Re: [WebDNA] Froala Editor working with WebDNA (Christer Olsson 2016)
  3. Re: [WebDNA] Froala Editor working with WebDNA (Kenneth Grome 2016)
  4. Re: [WebDNA] Froala Editor working with WebDNA (Christer Olsson 2016)
  5. Re: [WebDNA] Froala Editor working with WebDNA (Palle Bo Nielsen 2016)
  6. Fwd: [WebDNA] Froala Editor working with WebDNA (Palle Bo Nielsen 2016)
  7. Re: [WebDNA] Froala Editor working with WebDNA (Stuart Tremain 2016)
  8. Re: [WebDNA] Froala Editor working with WebDNA (Palle Bo Nielsen 2016)
  9. Re: [WebDNA] Froala Editor working with WebDNA (Stuart Tremain 2016)
  10. Re: [WebDNA] Froala Editor working with WebDNA (Palle Bo Nielsen 2016)
  11. Re: [WebDNA] Froala Editor working with WebDNA (Palle Bo Nielsen 2016)
  12. Re: [WebDNA] Froala Editor working with WebDNA (Stuart Tremain 2016)
  13. Re: [WebDNA] Froala Editor working with WebDNA (Stuart Tremain 2016)
  14. Re: [WebDNA] Froala Editor working with WebDNA (Palle Bo Nielsen 2016)
  15. Re: [WebDNA] Froala Editor working with WebDNA (Stuart Tremain 2016)
  16. Re: [WebDNA] Froala Editor working with WebDNA (Palle Bo Nielsen 2016)
  17. Re: [WebDNA] Froala Editor working with WebDNA (Stuart Tremain 2016)
  18. Re: [WebDNA] Froala Editor working with WebDNA (Palle Bo Nielsen 2016)
  19. Re: [WebDNA] Froala Editor working with WebDNA (Tom Duke 2016)
  20. Re: [WebDNA] Froala Editor working with WebDNA (Palle Bo Nielsen 2016)
  21. Re: [WebDNA] Froala Editor working with WebDNA (Palle Bo Nielsen 2016)
  22. Re: [WebDNA] Froala Editor working with WebDNA (Palle Bo Nielsen 2016)
  23. Re: [WebDNA] Froala Editor working with WebDNA (Stuart Tremain 2016)
  24. Re: [WebDNA] Froala Editor working with WebDNA (dale 2016)
  25. Re: [WebDNA] Froala Editor working with WebDNA (WebDNA Development 2016)
  26. [WebDNA] Froala Editor working with WebDNA (Palle Bo Nielsen 2016)
843 --Apple-Mail=_61AB15CB-24BE-44B8-B0C5-BCFC7E3E68C7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Palle I will have a look tomorrow for you. Kind regards Stuart Tremain Pharoah Lane Software AUSTRALIA webdna@idfk.com.au > On 18 Dec 2016, at 00:29, Palle Bo Nielsen = wrote: >=20 > Hi Stuaty >=20 > Thanks for your interest. >=20 > Ok, let me repeat the baseline just make sure we do not misunderstand = the setup. >=20 > I have made test page which uses the Froala framework with the aim of = using the function of drag=E2=80=99n=E2=80=99drop and image into the = TextArea field, only to be catched/saved Server Side and presented = Client Side as per the concept of Froala. I need this solution on my = next website which is currently under development. So basically WebDNA = as Server Side and Froala as Client Side. >=20 > You will find my test set up at the follow URL (id: a - pswd: a) >=20 > http://qt.dk/dev/froala/image/ >=20 > Information about the Froala client is here (wysiwyg html editor) >=20 > https://www.froala.com/wysiwyg-editor/ >=20 > But more important. Information about the Image drag=E2=80=99n=E2=80=99d= rop into Textarea her=E2=80=A6 >=20 > https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload >=20 > You suggested to include a [FormVariables =E2=80=A6] on the page. I = already did and therefor you can already find debug information at the = bottom of the page (qt.dk =E2=80=A6) >=20 > So the actual Froala Framework is setup and it works. M=C3=BD = challenge is to get the drag=E2=80=99ndrop image into textarea to work. = I am not sure how to catch the file from the Froala framework to start = with. Maybe I already did but again then I do not know how to store it = (save) server side. >=20 > I would really appreciate some guidance to get this working and I will = make sure the final result will be shared within the webdna community as = well as webdna.us and froala.com. >=20 > You also mention that =E2=80=9C...=46rom what I see in the script, the = receiving url for the file is: imageUploadURL: '/upload_image=E2=80=99, = =E2=80=A6=E2=80=9D. You might look at the wrong place as the = ImageUploadUrl is: "/dev/froala/image" >=20 > /Palle >=20 >=20 >=20 >> On 15 Dec 2016, at 23.15, Stuart Tremain wrote: >>=20 >> Hi Palle >>=20 >> Thanks for the link, now I can see what is going on. >>=20 >> =46rom what I see in the script, the receiving url for the file is:=20= >>=20 >> // Set the image upload URL. >>=20 >> imageUploadURL >> : '/upload_image', >>=20 >>=20 >> If you put [FormVariables = name=3D&exact=3DF][name]=3D[value]
[/FormVariables] on this page and = then post the results, I will be able to see what is going on, you can = do this by looking at the XHRs results in your browser. >>=20 >>=20 >>=20 >>=20 >> Kind regards >>=20 >> Stuart Tremain >> Pharoah Lane Software >> AUSTRALIA >> webdna@idfk.com.au >>=20 >>=20 >>=20 >>=20 >>=20 >>=20 >>> On 16 Dec 2016, at 07:25, Palle Bo Nielsen = wrote: >>>=20 >>> Hi Stuart >>>=20 >>> Please stop me if am using to much of your time, but=E2=80=A6 >>>=20 >>> First of all. If I understand your code correctly then it assumes = that a formvariable exist by the name of <=E2=80=9C_UPLOADEDFILENAME=E2=80= =9D> (your example), in my case it should be <=E2=80=9Cfile_name=E2=80=9D>= hence the =E2=80=98imageUploadParam=E2=80=99 which is set in the JS = code. >>>=20 >>> https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload >>>=20 >>> But the [formvariables=E2=80=A6] does not result in any variable by = that name or any other which is relevant for this proces which leaves me = in a situation where I have nothing to catch from the JS/Image File = supposedly being uploaded. >>>=20 >>> I think I understand the rest of the code but it is a prerequisite = than the formvariable is being identified and catched, right? >>>=20 >>> /Palle >>>=20 >>>=20 >>>=20 >>>> On 14 Dec 2016, at 21.52, Stuart Tremain = wrote: >>>>=20 >>>> Hi Palle >>>>=20 >>>> You will find that the file is being uploaded in a = multipart/form-data form, therefore you need to deal with the contents = in a different way rather than as name valued pairs. >>>>=20 >>>> Try this to capture the file name and it=E2=80=99s contents, I have = pulled it out of some working code: >>>>=20 >>>> [text]UPLOAD-DIRECTORY=3D../../pdfuploads/pdf-files[/TEXT] >>>>=20 >>>>=20 >>>> [FORMVARIABLES name=3D_UPLOADEDFILENAME&exact=3DF] >>>> [HIDEIF [url][value][/URL]=3D] >>>> [SHOWIF [url][name][/url]^[url]name=3D"[/url]] >>>> [HIDEIF [url][name][/url]^[url]filename=3D"[/url]]= >>>> [text][MIDDLE = StartAfter=3Dname=3D"&endbefore=3D"][name][/MIDDLE]=3D[value][/TEXT] >>>> [/HIDEIF] >>>> [/SHOWIF] >>>> [SHOWIF [url][name][/url]^[url]filename=3D"[/url]] >>>> [text]FULLFILENAME=3D[MIDDLE = StartAfter=3Dfilename=3D"&endbefore=3D"][name][/MIDDLE][/TEXT] >>>> [listwords words=3D[FULLFILENAME]&delimiters=3D:/\= ] >>>> = [text]THISFILENAME=3D[lowercase][convertchars = db=3D^noillegals.db][word][/convertchars][/LOWERCASE][/TEXT] >>>> [/listwords] >>>> [!]-------------- write the file to = [UPLOAD-DIRECTORY] --------------[/!] >>>> [SHOWIF [FULLFILENAME]=3D] >>>> [text]UPLOADMESSAGE=3DNo file was chosen = to upload.[/TEXT] >>>> [/SHOWIF] >>>> [HIDEIF [FULLFILENAME]=3D] >>>> [WRITEFILE = Secure=3DF&file=3D[UPLOAD-DIRECTORY]/[THISFILENAME]][value][/WRITEFILE] >>>> [text]UPLOADMESSAGE=3D[THISFILENAME] was = added to the pdf-files directory.[/TEXT] >>>> [/HIDEIF] >>>> [/SHOWIF] >>>> [/HIDEIF] >>>> [/FORMVARIABLES] >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>> noillegals.db file contents: >>>>=20 >>>> fromto >>>> _ >>>> #=09 >>>> @=09 >>>> ,=09 >>>> ;=09 >>>> $=09 >>>> !=09 >>>> /=09 >>>> \=09 >>>> :=09 >>>> +=09 >>>> +=09 >>>> *=09 >>>> (=09 >>>> )=09 >>>> &=09 >>>> ^=09 >>>> %=09 >>>> <=09 >>>>> =09 >>>> ~=09 >>>> `=09 >>>> [=09 >>>> ]=09 >>>> {=09 >>>> }=09 >>>> "=09 >>>> '=09 >>>> ?=09 >>>> =3D=09 >>>> _ >>>> = =E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2= =80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80= =93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93= END OF = FILE=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93= =E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2= =80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80= =93 >>>>=20 >>>>=20 >>>>=20 >>>> Kind regards >>>>=20 >>>> Stuart Tremain >>>> Pharoah Lane Software >>>> AUSTRALIA >>>> webdna@idfk.com.au >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>>=20 >>>>> On 15 Dec 2016, at 04:26, Palle Bo Nielsen = wrote: >>>>>=20 >>>>> Hi Tom >>>>>=20 >>>>> Thanks for the tip. It gave me the name of the file and the file = type but not the actual file content. >>>>>=20 >>>>> So why is it that I am able to get this data within a = sendmail/lformvariables context when I can not get it without the the = sendmail? >>>>>=20 >>>>> /Palle >>>>>=20 >>>>>=20 >>>>>> On 14 Dec 2016, at 16.08, Tom Duke = wrote: >>>>>>=20 >>>>>> Palle, >>>>>>=20 >>>>>> Set your 'imageUploadURL' to a WedDNA page. >>>>>>=20 >>>>>> Then on that page add a [sendmail] to yourself with a = [formvariables] in the body of the email: >>>>>>=20 >>>>>> [sendmail = to=3Dmyemail@email.com&from=3Dfroala@email.com&subject=3DFroala Editor = Upload Params] >>>>>>=20 >>>>>> [formvariables][name]:[value]
>>>>>> [/formvariables] >>>>>>=20 >>>>>> [/sendmail] >>>>>>=20 >>>>>> That will show you what data is being passed by the editor. You = should then be able to parse and deal with it. You *might* need to = change the 'imageUploadMethod' to 'post'. >>>>>>=20 >>>>>> There is info in the archives on how to deal with image uploads = (i.e http://webdna.us/page.dna?numero=3D58031). >>>>>>=20 >>>>>> - Tom >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>>=20 >>>>>> =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=3D=3D=3D=3D=3D=3D >>>>>> Digital Revolutionaries >>>>>> 1st Floor, Castleriver House >>>>>> 14-15 Parliament Street >>>>>> Temple Bar,Dublin 2 >>>>>> Ireland >>>>>> ---------------------------------------------- >>>>>> [t]: + 353 1 4403907 >>>>>> [e]: >>>>>> [w]: >>>>>> =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=3D=3D=3D=3D=3D=3D >>>>>>=20 >>>>>> On 14 December 2016 at 11:06, Palle Bo Nielsen = wrote: >>>>>> So I stated a project page where a lot is running as it should. >>>>>>=20 >>>>>> Current problem is that I need to make the form accept the = drag/drop image into the Textarea form which is supported by Froala. It = depends on some JS code=E2=80=A6 >>>>>>=20 >>>>>> imageUploadParam: 'file_name', >>>>>> imageUploadURL: '/dev/froala/image', >>>>>> imageUploadMethod: 'PUT', >>>>>> imageMaxSize: 1024 * 1024 * 3, >>>>>> imageAllowedTypes: ['jpeg', 'jpg', 'png'], >>>>>> =09 >>>>>> How can i extract the =E2=80=9CimageUploadParam=E2=80=9D into = WebDNA and how do I catch and store it=E2=80=A6? >>>>>>=20 >>>>>> =E2=80=9C...The upload flow for the image is quite simple and it = is explained here: = https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload. First = of all you have to tell the editor where to make the upload request = (imageUploadURL). Then, your server should catch the request, store the = image and then return a response in JSON format that looks like this: { = link: 'path/to/image.jpg' }=E2=80=A6" >>>>>>=20 >>>>>> If you have anything to add/contribute or just being helpful then = visits http://www.qt.dk/dev/froala/image/ (id and pass is lowercase = =E2=80=98a=E2=80=99). >>>>>>=20 >>>>>> /Palle >>>>>>=20 >>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>>=20 >>>>>>>> On 17 Nov 2016, at 07.55, Stuart Tremain = wrote: >>>>>>>>=20 >>>>>>>> Hey Palle >>>>>>>>=20 >>>>>>>> I had a bit of a look at this, it seems that Froala want a JSON = response: such as = {"link":"https://i.froala.com/download/6143ec97622356aaeb01df3b648b11a0f31= 76636.jpg?1479365089=E2=80=9D} >>>>>>>>=20 >>>>>>>> You can see this by viewing what the AJAX is returning. >>>>>>>>=20 >>>>>>>> I did have a bit of trouble making JSON work properly on a = server a while ago, the response needs to be handled properly through = Apache & webdna without any spaces at the beginning. If you have = problems, I will have a dig around for what I did to fix it for a system = that I developed. >>>>>>>>=20 >>>>>>>>=20 >>>>>>>>=20 >>>>>>>> Kind regards >>>>>>>>=20 >>>>>>>> Stuart Tremain >>>>>>>> Pharoah Lane Software >>>>>>>> AUSTRALIA >>>>>>>> webdna@idfk.com.au >>>>>>>>=20 >>>>>>>>=20 >>>>>>>>=20 >>>>>>>>=20 >>>>>>>>=20 >>>>>>>>=20 >>>>>>>>> On 7 Nov. 2016, at 02:15, Palle Bo Nielsen = wrote: >>>>>>>>>=20 >>>>>>>>> Evening all >>>>>>>>>=20 >>>>>>>>> Some of you might know the Froala Javascript Editor which in = my opinion is a great editor. The editor enabled a lot of function = within a textarea which for me works great. One of the function where I = have not been able to make it work is the the image function where you = can drag and drop an image to the textarea - the image is being uploaded = and displayed in the textarea. The reason for me not being able to make = it work is that the Froala Editor expects some handling server side and = I can not figure it out. The great thing is that I have WebDNA to = provide me with the server side stuff; the bad thing is that I can not = see what is needed. >>>>>>>>>=20 >>>>>>>>> = https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload >>>>>>>>>=20 >>>>>>>>> Any care to join me in making it happen? >>>>>>>>>=20 >>>>>>>>> The result could be used by Froala as an official WebDNA SDK = just as an PHP has been published. This could benefit the WebDNA = community. >>>>>>>>>=20 >>>>>>>>> https://www.froala.com/wysiwyg-editor >>>>>>>>>=20 >>>>>>>>> https://www.froala.com/wysiwyg-editor/docs >>>>>>>>>=20 >>>>>>>>> I hope for a positive response :) >>>>>>>>>=20 >>>>>>>>> /Palle >>>>>>>>>=20 >>>>>>>>>=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 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 >>>>>=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 >>=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=_61AB15CB-24BE-44B8-B0C5-BCFC7E3E68C7 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hi Palle

I = will have a look tomorrow for you.


Kind regards

Stuart Tremain
Pharoah Lane Software
AUSTRALIA






On 18 Dec 2016, at 00:29, Palle Bo Nielsen <powerpalle@powerpalle.dk> wrote:

Hi = Stuaty

Thanks for your interest.

Ok, let me repeat the baseline just make sure = we do not misunderstand the setup.

I have = made test page which uses the Froala framework with the aim of using the = function of drag=E2=80=99n=E2=80=99drop and image into the TextArea = field, only to be catched/saved Server Side and presented Client Side as = per the concept of Froala. I need this solution on my next website which = is currently under development. So basically WebDNA as Server Side and = Froala as Client Side.

You will find my = test set up at the follow URL (id: a - pswd: a)

http://qt.dk/dev/froala/image/

Information about the Froala client is here (wysiwyg html = editor)

https://www.froala.com/wysiwyg-editor/

But more important. Information about the Image = drag=E2=80=99n=E2=80=99drop into Textarea her=E2=80=A6

https://www.froala.com/wysiwyg-editor/docs/concepts/image/uploa= d

You suggested to include a [FormVariables = =E2=80=A6] on the page. I already did and therefor you can already find = debug information at the bottom of the page (qt.dk =E2=80=A6)

So the actual Froala Framework is setup and it = works. M=C3=BD challenge is to get the drag=E2=80=99ndrop image into = textarea to work. I am not sure how to catch the file from the Froala = framework to start with. Maybe I already did but again then I do not = know how to store it (save) server side.

I = would really appreciate some guidance to get this working and I will = make sure the final result will be shared within the webdna community as = well as webdna.us and froala.com.

You also = mention that =E2=80=9C...=46rom what I see in the script, the receiving = url for the file is: imageUploadURL: '/upload_image=E2=80=99, =E2=80=A6=E2= =80=9D. You might look at the wrong place as the ImageUploadUrl is: = "/dev/froala/image"

/Palle



On 15 Dec 2016, at 23.15, Stuart Tremain = <webdna@idfk.com.au> wrote:

Hi = Palle

Thanks for the link, now I can see = what is going on.

=46rom what I see in the = script, the receiving url for the file is:

= // Set the image upload URL.

=        imageUploadURL
: = '/upload_image',


If you put = [FormVariables = name=3D&exact=3DF][name]=3D[value]<br>[/FormVariables] on this = page and then post the results, I will be able to see what is going on, = you can do this by looking at the XHRs results in your browser.




Kind regards

Stuart Tremain
Pharoah Lane Software
AUSTRALIA
webdna@idfk.com.au






On 16 Dec 2016, at = 07:25, Palle Bo Nielsen <powerpalle@powerpalle.dk> wrote:

Hi Stuart

Please = stop me if  am using to much of your time, but=E2=80=A6

First of all. If I understand your code = correctly then it assumes that a formvariable exist by the name of = <=E2=80=9C_UPLOADEDFILENAME=E2=80=9D> (your example), in my case = it should be <=E2=80=9Cfile_name=E2=80=9D> hence the = =E2=80=98imageUploadParam=E2=80=99 which is set in the JS code.

https://www.froala.com/wysiwyg-editor/docs/concepts/image/uploa= d

But the [formvariables=E2=80=A6] does not = result in any variable by that name or any other which is relevant for = this proces which leaves me in a situation where I have nothing to catch = from the JS/Image File supposedly being uploaded.

I think I understand the rest of the code but it is a = prerequisite than the formvariable is being identified and catched, = right?

/Palle



On 14 Dec 2016, at 21.52, Stuart Tremain = <webdna@idfk.com.au> wrote:

Hi = Palle

You will find that the file is being = uploaded in a multipart/form-data form, therefore you need to deal with = the contents in a different way rather than as name valued pairs.

Try this to capture the file name and it=E2=80=99= s contents, I have pulled it out of some working code:

[text]UPLOAD-DIRECTORY=3D../../pdfuploads/pdf-files[/TEXT]


[FORMVARIABLES = name=3D_UPLOADEDFILENAME&exact=3DF]
[HIDEIF = [url][value][/URL]=3D]
[SHOWIF = [url][name][/url]^[url]name=3D"[/url]]
[HIDEIF = [url][name][/url]^[url]filename=3D"[/url]]
= [text][MIDDLE = StartAfter=3Dname=3D"&endbefore=3D"][name][/MIDDLE]=3D[value][/TEXT]= = = [/HIDEIF]
[/SHOWIF]
[SHOWIF = [url][name][/url]^[url]filename=3D"[/url]]
= [text]FULLFILENAME=3D[MIDDLE = StartAfter=3Dfilename=3D"&endbefore=3D"][name][/MIDDLE][/TEXT]
= = = [listwords words=3D[FULLFILENAME]&delimiters=3D:/\]
= = = = [text]THISFILENAME=3D[lowercase][convertchars = db=3D^noillegals.db][word][/convertchars][/LOWERCASE][/TEXT]
= = = [/listwords]
[!]-------------- write the file = to [UPLOAD-DIRECTORY] --------------[/!]
[SHOWIF = [FULLFILENAME]=3D]
[text]UPLOADMESSAGE=3DNo file was = chosen to upload.[/TEXT]
[/SHOWIF]
[HIDEIF = [FULLFILENAME]=3D]
[WRITEFILE = Secure=3DF&file=3D[UPLOAD-DIRECTORY]/[THISFILENAME]][value][/WRITEFILE= ]
= = = = [text]UPLOADMESSAGE=3D[THISFILENAME] was added to the pdf-files = directory.[/TEXT]
[/HIDEIF]
= [/SHOWIF]
[/HIDEIF]
[/FORMVARIABLES]




noillegals.db file contents:

fromto
_
#=
@
,
;=
$
!
/=
\
:
+=
+
*
(=
)
&
^=
%
<

~
`
[=
]
{
}=
"
'
?=
=3D
_
=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93= =E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2= =80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80= =93=E2=80=93END OF = FILE=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93= =E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2= =80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80=93=E2=80= =93



Kind = regards

Stuart Tremain
Pharoah = Lane Software
AUSTRALIA
webdna@idfk.com.au





On 15 = Dec 2016, at 04:26, Palle Bo Nielsen <powerpalle@powerpalle.dk> = wrote:

Hi Tom

Thanks for the tip. It gave me the name of the file and the = file type but not the actual file content.

So= why is it that I am able to get this data within a = sendmail/lformvariables context when I can not get it without the the = sendmail?

/Palle


On 14 Dec = 2016, at 16.08, Tom Duke <tom@revolutionaries.ie> wrote:

Palle,

Set your = 'imageUploadURL' to a WedDNA page.

Then on = that page add a [sendmail] to yourself with a [formvariables] in the = body of the email:

[sendmail = to=3Dmyemail@email.com&from=3Dfroala@email.com&subject=3DFroala = Editor Upload Params]

[formvariables][name]:[value]<br />
[/formvariables]

[/sendmail]

That will show you what data is being passed = by the editor.  You should then be able to parse and deal with it. = You *might* need to change the 'imageUploadMethod' to 'post'.

There is info in the archives on how to deal = with image uploads (i.e http://webdna.us/page.dna?numero=3D58031).

- Tom




=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=3D=3D=3D=3D=3D=3D=
Digital Revolutionaries
1st Floor, = Castleriver House
14-15 Parliament Street
Temple Bar,Dublin 2
Ireland
----------------------------------------------
[t]: + 353 1 4403907
[e]: = <mailto:tom@revolutionaries.ie>
[w]: = <http://www.revolutionaries.ie/>
=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=3D=3D=3D=3D=3D=3D=

On 14 December 2016 at 11:06, Palle Bo = Nielsen <powerpalle@powerpalle.dk> wrote:
So I = stated a project page where a lot is running as it should.

Current problem is that I need to make the = form accept the drag/drop image into the Textarea form which is = supported by Froala. It depends on some JS code=E2=80=A6
= imageUploadParam: 'file_name',
= imageUploadURL: '/dev/froala/image',
= imageUploadMethod: 'PUT',
= imageMaxSize: 1024 * 1024 * 3,
= imageAllowedTypes: ['jpeg', 'jpg', 'png'],

How can i extract the =E2=80=9CimageUploadParam=E2=80=9D into = WebDNA and how do I catch and store it=E2=80=A6?

=E2=80=9C...The upload flow for the image is quite simple and = it is explained here: = https://www.froala.com/wysiwyg-editor/docs/concepts/image/upload. First = of all you have to tell the editor where to make the upload request = (imageUploadURL). Then, your server should catch the request, store the = image and then return a response in JSON format that looks like this: { = link: 'path/to/image.jpg' }=E2=80=A6"

If = you have anything to add/contribute or just being helpful then visits = http://www.qt.dk/dev/froala/image/ (id and pass is lowercase = =E2=80=98a=E2=80=99).

/Palle






On 17 Nov 2016, at = 07.55, Stuart Tremain <webdna@idfk.com.au> wrote:

Hey Palle

I had a bit of a look = at this, it seems that Froala want a JSON response: such as = {"link":"https://i.froala.com/download/6143ec97622356aaeb01df3b648b11a0f31= 76636.jpg?1479365089=E2=80=9D}

You can see = this by viewing what the AJAX is returning.

I= did have a bit of trouble making JSON work properly on a server a while = ago, the response needs to be handled properly through Apache & = webdna without any spaces at the beginning. If you have problems, I will = have a dig around for what I did to fix it for a system that I = developed.



Kind= regards

Stuart Tremain
Pharoah= Lane Software
AUSTRALIA
webdna@idfk.com.au





On 7 Nov. 2016, at 02:15, Palle Bo Nielsen = <powerpalle@powerpalle.dk> wrote:

Evening all

Some of you might = know the Froala Javascript Editor which in my opinion is a great editor. = The editor enabled a lot of function within a textarea which for me = works great. One of the function where I have not been able to make it = work is the the image function where you can drag and drop an image to = the textarea - the image is being uploaded and displayed in the = textarea. The reason for me not being able to make it work is that the = Froala Editor expects some handling server side and I can not figure it = out. The great thing is that I have WebDNA to provide me with the server = side stuff; the bad thing is that I can not see what is needed.

https://www.froala.com/wysiwyg-editor/docs/concepts/image/uploa= d

Any care to join me in making it = happen?

The result could be used by Froala = as an official WebDNA SDK just as an PHP has been published. This could = benefit the WebDNA community.

https://www.froala.com/wysiwyg-editor

https://www.froala.com/wysiwyg-editor/docs

I hope for a positive response :)

/Palle




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

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

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

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

--------------------------------------------------------- = 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 <talk@webdna.us>.
To = unsubscribe, E-mail to: <talk-leave@webdna.us>
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=_61AB15CB-24BE-44B8-B0C5-BCFC7E3E68C7-- . 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:

PDF mailing labels (2000) RE: 2nd WebCatalog2 Feature Request (1996) Exclude by date - multiple (1997) WCS Newbie question (1997) PIXO (1997) 4.0.2b4 (2000) Running _every_ page through WebCat ? (1997) Tab Charactor (1997) Subject: Authenticating users without dialog box (1997) WebCat2: Found Items syntax, etc. (1997) [WebDNA] WebDNA 7 (2011) pull downs (1997) Printing controls - form feeds (2002) formulas.db problem solved (1998) Time for a hard questions. (1997) Access Denied! But why? (1997) WC2b15 File Corruption (1997) [LOOKUP] (1997) returning the missing value (1997) Server crashes and triggers . . . are they linked? (2001)