Hey @sbrajesh,
Long time no chat ??
I was running into a similar issue here in that:
A) I could successfully upload images into the activity form box (form#whats-new)
But,
B) When I press submit, only the text gets submitted, and the image stays in the activity box.
After digging around I came across a possible workaround.
on line 3 of mpp.js
you defined (var jq = jQuery;)
But I wondered if mediapress initially declared the (jq) variable, then another plugin could possibly also have the same (var jq = jQuery;) line in their plugin… Making the mediapress jq erased/cleared…. so basically the ajaxSend/ajaxComplete functions on lines 169-182 would be obsolete since another plugin re-wrote the same variable (var jq = jQuery).
So I tested this by:
1) Moving (Line 3: var jq = jQuery;) and moved it to (Line 1)
2) Changed (Line 1: var jq = jQuery;) to (var jq_newbie = jQuery.noConflict();)
3) Changed every instance of jQuery & jq into ‘jq_newbie’
4) Refreshed the page, uploaded an image successfully, & when I pressed ‘SUBMIT’ the activity post was created with the attached image as expected. It even closed/hid the Dropzone like you wrote in your code.
:))))))))
So maybe all you need is to use a different variable name for jQuery so that the ajaxSend/ajaxComplete functions don’t get deleted by another plugin using the same naming convention.
Any ways hope this helps.
Your pal
-Abe (not sam ?? )