How do I access the upload file event.
How do I access the upload file event.
Hi guys,
I am using the editor with the 'upload-many.php' script.
I also use CKEditor to produce some formatted text with the DESC field.
I create a record then drag & drop image files onto the editor.
I then cut and paste the following into the html source of the DESC.
<p><img alt="" src="http://www.surplusanywhere.com/upload/165.jpg" style="box-shadow:grey 10px 10px 5px; display:block; margin:30px auto; width:75%" /></p>
I do this for each image and replace 165 with the current filename. This gives me nice formatted images.
I now want to do this programatically with each file upload.
So on file uploaded get the uploaded file name ( e.g. 265 )
Update the current DESC field with '.... www.surplusanywhere.com/upload/265.jpg ' added to the end of the data.
Do this for each file upload.
Any ideas ?
Cheers
Steve Warby.
Answers
Would the
uploadXhrSuccess
event do the trick?C
Thanks Colin,
I have that event working and I can see the json returned.
I can get 612.png as the filename.
I now create the string
In the editor I have the following:
which is the 'quotes.notes' field I want add the above string into.
How do I add this please ?
Cheers
Steve Warby
I found it ( I had used this in another project a while ago)
I access the data s follows:
The complete routine is here.
This will save me hours........LOL
This works okay when I drag and drop a few files at once as well.
Cheers
Steve Warby
Hi Steve,
Excellent, glad it's all working!
Cheers,
Colin