• Resolved atempel

    (@atempel)


    Hey!

    Awesome plugin, thanks for the contribution!

    I have some remarks about the usability of the plugin, one thing is the ability to upload directly to a WordPress folder or Media Library (which I saw you answered in another topic that it is already in the works, or so. Looking forward to it)

    But my real request is:
    When the file exceeds the file size, the plugin “alerts” a message in the javascript using a default message: “The uploaded file exceeds the Upload Max File size”.
    I could even help with that, but it would be best practice to make this message inline, and translatable, just like the uploader body. Which was a great job letting people translate that.

    For now, what I did was to translate it directly into the minified js file, since there’s no other way.

    Is that possible?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Glen Mongaya

    (@glenwpcoder)

    Yes sure, I will do that.

    Thanks.

    Plugin Author Glen Mongaya

    (@glenwpcoder)

    Hi, I’ve added an option in the admin where you can change that message.
    Go to WP-admin menu Contact -> Drag and Drop Upload -> Error Message Section

    Please update to version 1.2.3

    • This reply was modified 5 years, 2 months ago by Glen Mongaya.
    Thread Starter atempel

    (@atempel)

    Hey Glen!

    Thanks a lot for the addition! I’m sure I won’t be the only one to use it 😀

    Another thing I did with my install was to add an “info message” using the native success/error message you created when the upload is really attached (I noticed a brief difference between the 100% upload and the ajax XHR real finish…

    dnd-upload-cf7.js

    Cf7myUploadFile.CodeDropz_Uploader({
    		'color'				:	'#fff',
    		'ajax_url'			: 	dnd_cf7_uploader.ajax_url,
    		'max_upload_size'	: 	Cf7myUploadFile.data('limit'),
    		'supported_type'	:	Cf7myUploadFile.data('type'),
    		'max_file'			:	Cf7myUploadFile.data('max'),
    		'text'				: 	TextOJB.text,
    		'separator'			: 	TextOJB.or_separator,
    		'button_text'		:	TextOJB.browse,
    		'on_success'		:	function( progressBar, response ){
    
    			// Progressbar Object
    			var progressDetails = $('#' + progressBar );
    
    			if ($('.dnd-progress-bar > span').hasClass('complete')) {
        		console.log('File upload complete');
        		$('.dnd-upload-details .wait').remove();
        		$('.dnd-upload-details').append('<span class="success">The file was successfully attached</span>');
        		$('input[type="submit"]').removeClass('disabled').prop( "disabled", false )
        	}
    
    			// Append hidden input field
    			progressDetails
    				.find('.dnd-upload-details')
    					.append('<span><input type="hidden" name="'+ Cf7myUploadFile.attr('name') +'[]" value="'+ response.data.path +'/'+ response.data.file +'"></span>');
    		}
    	});

    codedropz-uploader.js (deminified) aprox line 36

    d.handler.on("change", function(e) {
                t(this.files, "click"),
                jQuery('.dnd-upload-details').append('<span class="wait">Wait... <i class="fa fa-refresh fa-spin fa-fw" aria-hidden="true"></i></span>'),
                jQuery('input[type="submit"]').addClass('disabled').prop( "disabled", true )
            });
    • This reply was modified 5 years, 2 months ago by atempel.
    Plugin Author Glen Mongaya

    (@glenwpcoder)

    Hey Man,

    Thanks for this will give it a try.

    Really appreciate it 🙂

    Regards,
    Glen

    Plugin Author Glen Mongaya

    (@glenwpcoder)

    Added on version 1.2.4

    Closing this thread now.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Feature Request] Translate “The uploaded file exceeds the Upload Max File size”’ is closed to new replies.