Please select a file error
I guess it is a hosting issue. Contact your hosting company support. If it is in the localhost server then there may have a permission issue …
I guess it is a hosting issue. Contact your hosting company support. If it is in the localhost server then there may have a permission issue …
The current screen doesn’t appear to be set when that filter is run, so you cannot use that. Also, the $post actually refers to the attachment, not the post – so we can’t get the post typ fro that either…. So looking at the source code: http://core.trac.wordpress.org/browser/tags/3.3.2/wp-admin/includes/media.php The filter you are using is called by … Read more
There a couple of different solutions depending on the cause of the problem. In your case it seems that is not a upload problem. I would rather try adding the following plugin <?php /* Plugin Name: Default to GD Plugin URI: http://wordpress.org/extend/plugins/default-to-gd Description: Sets GD as default WP_Image_Editor class. Author: Mike Schroder Version: 1.0 Author … Read more
May be this filter should work intermediate_image_sizes Note: This solution will work if you are uploading an image from post edit screen. (tested on localhost with WP-3.8.1) add_filter( ‘intermediate_image_sizes’, ‘ravs_slider_image_sizes’, 999 ); function ravs_slider_image_sizes( $image_sizes ){ // size for slider $slider_image_sizes = array( ‘your_image_size_1’, ‘your_image_size_2’ ); // for ex: $slider_image_sizes = array( ‘thumbnail’, ‘medium’ ); … Read more
Use filter ‘upload_mimes‘. <?php add_filter(‘upload_mimes’,’add_java_files’); function add_java_files($mimes) { // Add file extension ‘extension’ with mime type ‘mime/type’ $mimes[‘java’] = ‘text/x-java-source’; return $mimes; }
The library parameter is actually responsible of what you see in the library frame and not what you can upload. It accepts : image,audio,video,file or any other mime type for example to show only pdf’s : library: { type: ‘application/pdf’ }, Now to actually limit the upload to a file type you need to add … Read more
I’ve had the same issue in the past when uploading very large images. When it comes to crunching the image it fails and shows HTTP ERROR in red. However other images continue to load. It wasnt file size where it would fail but rather the pixel width and height of the images. By default PHP … Read more
You’ve got some issues in your underlying objective … For example, I have a filed called 40c.jpg located at localhost/files/2011/07/40c.jpg OK, this makes sense and is where the image should be in the first place. I want the file to show up only when called by HTML on the local domain (here: localhost). So not … Read more
Found the solution: It can be turned off: add_filter( ‘big_image_size_threshold’, ‘__return_false’ ); More: here
Are you on shared hosting by any chance? Shared hosts tend to limit the max uploadable file size on their end and there is nothing you can add to your scripts to change that. If not, then I am mistaken and this is not the solution you are looking for. However, if you are on … Read more