Title: Avoid some messages
Last modified: August 31, 2016

---

# Avoid some messages

 *  Resolved [cargarm3](https://wordpress.org/support/users/cargarm3/)
 * (@cargarm3)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/avoid-some-messages/)
 * Is there any option of not showing some messages? For example, in my site two
   messages are shown : “Please, wait while redirecting” and “File XXX was succesfully
   uploaded” down. I just want to show “File XXX was succesfully uploaded”, and 
   not the first one (but of course, I want a direct redirection).
 * Thank you.
 * [https://wordpress.org/plugins/wp-file-upload/](https://wordpress.org/plugins/wp-file-upload/)

Viewing 11 replies - 1 through 11 (of 11 total)

 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/avoid-some-messages/#post-7344613)
 * no unfortunately there is not such an option, however Javascript is a very reconfigurable
   language so I came up with a script that can do the job.
 * Copy and paste the following code inside the page with the plugin, right below
   the shortcode:
 *     ```
       <script type="text/javascript">
       Object.prototype.watch||Object.defineProperty(Object.prototype,"watch",{enumerable:!1,configurable:!0,writable:!1,value:function(e,t){var r=this[e],n=r,c=function(){return n},i=function(c){return r=n,n=t.call(this,e,r,c)};if (delete this[e]) {Object.defineProperty(this,e,{get:c,set:i,enumerable:!0,configurable:!0})}}}),Object.prototype.unwatch||Object.defineProperty(Object.prototype,"unwatch",{enumerable:!1,configurable:!0,writable:!1,value:function(e){var t=this[e];delete this[e],this[e]=t}});
       if (typeof original_wfu_ProcessUploadComplete == "undefined") original_wfu_ProcessUploadComplete = window["wfu_ProcessUploadComplete"];
       window["wfu_ProcessUploadComplete"] = function(sid, file_id, upload_params, unique_id, params_index, session_token, safe_output, debug_data, request_type, js_script_enc) {
       	var w = false; if (!!GlobalData[sid]) { GlobalData[sid].watch("upload_state", function (id, ov, nv) { return (nv == 11) ? ov : nv; }); w = true; }
       	return original_wfu_ProcessUploadComplete(sid, file_id, upload_params, unique_id, params_index, session_token, safe_output, debug_data, request_type, js_script_enc);
       	if (w) GlobalData[sid].unwatch("upload_state"); }
       </script>
       ```
   
 * I have tested it in all major browsers. Let me know if it works.
 * Nickolas
 *  Thread Starter [cargarm3](https://wordpress.org/support/users/cargarm3/)
 * (@cargarm3)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/avoid-some-messages/#post-7344678)
 * Yes, it works. The problem is that I don’t want to show the arrow with two messages.
   I mean, when file is uploaded, both text are shown : “All Files uploaded succesfully”
   and “File XXX was succesfully uploaded” with a drop menu.
 * What I want is to show is just this own text : “File XXX was succesfully uploaded,
   please wait while directing …” and no others.
 * You can have a look at this example:
 * Thank you.
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/avoid-some-messages/#post-7344770)
 * ok try the following script:
 *     ```
       <script type="text/javascript">
       Object.prototype.watch||Object.defineProperty(Object.prototype,"watch",{enumerable:!1,configurable:!0,writable:!1,value:function(e,t){var r=this[e],n=r,c=function(){return n},i=function(c){return r=n,n=t.call(this,e,r,c)};if (delete this[e]) {Object.defineProperty(this,e,{get:c,set:i,enumerable:!0,configurable:!0})}}}),Object.prototype.unwatch||Object.defineProperty(Object.prototype,"unwatch",{enumerable:!1,configurable:!0,writable:!1,value:function(e){var t=this[e];delete this[e],this[e]=t}});
       if (typeof original_wfu_ProcessUploadComplete == "undefined") original_wfu_ProcessUploadComplete = window["wfu_ProcessUploadComplete"];
       window["wfu_ProcessUploadComplete"] = function(sid, file_id, upload_params, unique_id, params_index, session_token, safe_output, debug_data, request_type, js_script_enc) {
       	var w = false; var rl = ""; var G = null; if (!!GlobalData[sid]) { G = GlobalData[sid]; G.watch("last", function (id, ov, nv) { if (nv) {rl = G.redirect_link; G.redirect_link = "";} return nv; }); w = true; }
       	var last = original_wfu_ProcessUploadComplete(sid, file_id, upload_params, unique_id, params_index, session_token, safe_output, debug_data, request_type, js_script_enc);
       	if (w) GlobalData[sid].unwatch("last"); if (rl != "") wfu_Redirect(rl); return last; }
       </script>
       ```
   
 * Nickolas
 *  Thread Starter [cargarm3](https://wordpress.org/support/users/cargarm3/)
 * (@cargarm3)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/avoid-some-messages/#post-7344771)
 * Great, It works. Now my last question). I Want to place the text “File XXX was
   succesfully uploaded, **Please Wait**“. Is there a way to change it with no modifying
   the languaje source files?
 * Thanks for all
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/avoid-some-messages/#post-7344772)
 * yes, using the visual editor of the plugin go to the Labels tab, there you can
   configure the success message
 * Nickolas
 *  Thread Starter [cargarm3](https://wordpress.org/support/users/cargarm3/)
 * (@cargarm3)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/avoid-some-messages/#post-7344773)
 * Perfect, thank you very much. Great pluggin
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/avoid-some-messages/#post-7344774)
 * thank you, marking it as resolved
 *  Thread Starter [cargarm3](https://wordpress.org/support/users/cargarm3/)
 * (@cargarm3)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/avoid-some-messages/#post-7344815)
 * Ops … detected another problems :
 * – Now, if file fails (because of type of file not correct or because od any other
   reason), the script allows to go to next Step. ¿Any solution?
 * (try for example to upload a PDF in [http://scarabaeus.co.uk/image/](http://scarabaeus.co.uk/image/),
   configured just for png and jpg)
 * Thank you.
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/avoid-some-messages/#post-7344817)
 * I will check and let you know
 * Nickolas
 *  Plugin Author [nickboss](https://wordpress.org/support/users/nickboss/)
 * (@nickboss)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/avoid-some-messages/#post-7344820)
 * Hi, please try the following one:
 *     ```
       <script type="text/javascript">
       Object.prototype.watch||Object.defineProperty(Object.prototype,"watch",{enumerable:!1,configurable:!0,writable:!1,value:function(e,t){var r=this[e],n=r,c=function(){return n},i=function(c){return r=n,n=t.call(this,e,r,c)};if (delete this[e]) {Object.defineProperty(this,e,{get:c,set:i,enumerable:!0,configurable:!0})}}}),Object.prototype.unwatch||Object.defineProperty(Object.prototype,"unwatch",{enumerable:!1,configurable:!0,writable:!1,value:function(e){var t=this[e];delete this[e],this[e]=t}});
       if (typeof original_wfu_ProcessUploadComplete == "undefined") original_wfu_ProcessUploadComplete = window["wfu_ProcessUploadComplete"];
       window["wfu_ProcessUploadComplete"] = function(sid, file_id, upload_params, unique_id, params_index, session_token, safe_output, debug_data, request_type, js_script_enc) {
       	var w = false; var rl = ""; var G = null; if (!!GlobalData[sid]) {G = GlobalData[sid]; G.watch("last", function (id, ov, nv) { if (nv) {rl = G.redirect_link; G.redirect_link = ""; G.admin_messages.redirect = "";} return nv; }); w = true; }
       	var last = original_wfu_ProcessUploadComplete(sid, file_id, upload_params, unique_id, params_index, session_token, safe_output, debug_data, request_type, js_script_enc);
       if (w) GlobalData[sid].unwatch("last"); if (!!GlobalData[sid]) {G = GlobalData[sid]; if (!(G.errors.redirect != "" || rl == "")) wfu_Redirect(rl); return last;}}
       </script>
       ```
   
 * Nickolas
 *  Thread Starter [cargarm3](https://wordpress.org/support/users/cargarm3/)
 * (@cargarm3)
 * [10 years ago](https://wordpress.org/support/topic/avoid-some-messages/#post-7344821)
 * Now it works, thank you.

Viewing 11 replies - 1 through 11 (of 11 total)

The topic ‘Avoid some messages’ is closed to new replies.

 * ![](https://ps.w.org/wp-file-upload/assets/icon-256x256.png?rev=3252590)
 * [Iptanus File Upload](https://wordpress.org/plugins/wp-file-upload/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-file-upload/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-file-upload/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-file-upload/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-file-upload/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-file-upload/reviews/)

## Tags

 * [messages](https://wordpress.org/support/topic-tag/messages/)

 * 11 replies
 * 2 participants
 * Last reply from: [cargarm3](https://wordpress.org/support/users/cargarm3/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/avoid-some-messages/#post-7344821)
 * Status: resolved