The uploaded file exceeds the upload_max_filesize directive in php.ini
You need to make the following changes in php.ini file on your server. upload_max_filesize = 100M post_max_size = 100M If still it’s same then update value of memory_limit.
You need to make the following changes in php.ini file on your server. upload_max_filesize = 100M post_max_size = 100M If still it’s same then update value of memory_limit.
This is how the plupload upoader is loaded on Media > Add New do_action( ‘pre-plupload-upload-ui’ ); // all the html output for plupload’s use do_action( ‘post-plupload-upload-ui’ ); If it was this instead: ob_start(); // all the html output for plupload’s use ob_end_clean(); Then no UI, no plupload: add_action( ‘pre-plupload-upload-ui’, ‘ob_start’ ); add_action( ‘post-plupload-upload-ui’, ‘ob_end_clean’ ); … Read more
Your site is very, very heavy at 4+ megs. Lighten it up; see http://gtmetrix.com/reports/www.moseleycoachsales.co.uk/eyz4qxQx Fix the code errors, such as not specifying image dimensions, not correctly scaling your images, not optimizing your images, setting browser caching and expires headers, etc. Your site speed has very little to do with one 404 for one style sheet. … Read more
Assuming you want to have a CDN effect or even for some security reasons (we also look into that but CDN will cost us too much (we have over 1TB monthly)), maybe following links will guide you into the right direction. This info I found here on stackechange itself These links tell some about using … Read more
So I figured this out. The function wp_insert_attachment() sanitizes file names parsed to it. In the process it was removing spaces in filenames. To avoid this I did my own sanitization (still using WP functions) before parsing the filenames. I renamed my files using sanitize_file_name() and this added hyphens (what I desired really) into all … Read more
Disclaimer: I guess it’s not a real answer and has way to much outside links, but it just won’t fit into the comment format. So this can be considered to be just for information purposes. I guess this Add new media uploader at frontend for wp 3.5+ uses about what you’ve already tried. But there … Read more
Figured out the answer to the question. file_frame.on(‘open’, function() { var selection = file_frame.state().get(‘selection’); var library = file_frame.state(‘gallery-edit’).get(‘library’); var ids = jQuery(‘#fg_perm_metadata’).val(); if (ids) { idsArray = ids.split(‘,’); idsArray.forEach(function(id) { attachment = wp.media.attachment(id); attachment.fetch(); selection.add( attachment ? [ attachment ] : [] ); }); file_frame.setState(‘gallery-edit’); idsArray.forEach(function(id) { attachment = wp.media.attachment(id); attachment.fetch(); library.add( attachment ? [ … Read more
I just ran into this. The reason is that you are overriding the window.send_to_editor function with one of your own. WordPress uses this function to insert galleries and other stuff, so now that you’ve changed it, it can’t. Ideally’ you’d want to use an event triggered by the media uploader instead of just replacing the … Read more
I found nothing better than: // switch to attachment browser wp.media.frame.content.mode(‘browse’); // refresh attachment collection wp.media.frame.content.view.views._views[“.media-frame-content”][0].views._views[“”][1].collection.props.set({ignore:(+(new Date()))}); Feel free to add proper way of doing this.
Maybe I was over thinking, but the solution is easier than I thought. I just have to limit the event handler to some element, so other unrelated ones will not trigger the handler. In this case, .media-modal is the overall parent of the media library element, so I am specifying this extra selector to the … Read more