Articles of uploads

How to get the image url in the input box from media library?

I have added a post meta to upload image using wordpress media uploader. Looks like it’s a javascript work. I am no good in javascript. I took the js from here: Here is the js code: jQuery(document).ready(function($){ // Instantiates the variable that holds the media library frame. var meta_image_frame; // Runs when the image button […]

How to allow to user non logged in WP system upload in media library?

I’m stuck right now. For my project, I have to create login not using WP user system but another system. Now, when with my system API login, I created some cookie but, obviously I didn’t also create wp cookie for user logged in. So, I want to allow a user upload with media library of […]

Adding File Extensions to Attachment Page Permalinks

Introduction When uploading a file (stackexchange.jpg) to the media library in a WordPress site, there are two relevant links. Direct link to file Attachment page My question deals with the second one: attachment page. What I Want to Do I would like to add the file extension in the attachment page permalink. For example, instead […]

How much will mounting wp-content on a separate NFS server impact performance?

I’m thinking of using multiple web servers with a load balancer in a big WP install. The database will be on a separate server and that’s the easy part. Trickier is files in blogs.dir, and to a lesser extent, the themes and plugins folders. So I plan to use a separate NFS server, either for […]

How to set a Minimum Image Dimension for Uploading

I want to set minimum image dimensions for specific input field with id= “job_logo” in a submission form on the front end According to this answer How to Require a Minimum Image Dimension for Uploading? Following code sets the limit for all the image uploads add_filter(‘wp_handle_upload_prefilter’,’tc_handle_upload_prefilter’); function tc_handle_upload_prefilter($file) { $img=getimagesize($file[‘tmp_name’]); $minimum = array(‘width’ => ‘640’, […]

WordPress Media mime type filter problem 4.0

I have added new mime types with the ‘post_mime_types’ filter eg. PDF, doc, mp3 etc… Filtering by custom mime type on the upload.php page in media grid view works as expected but in list view it doesn’t. The problem is that WordPress passes the mime types through urlencode as it builds the html (wp-admin/includes/class-wp-media-list-table.php:73) and […]

How to upload image from front end and save in media library?

I am working on a plugin .I want to upload image from front end i.e by input type=”file”.I did lot of google for it but could not upload image .Here is my code for uploading image <form method=”post” action=”options.php”> <input type=”file” name=”my_image_upload” id=”my_image_upload” multiple=”false” /> <input type=”hidden” name=”post_id” id=”post_id” value=”55″ /> <?php wp_nonce_field( ‘my_image_upload’, ‘my_image_upload_nonce’ […]

Media upload – choose only one file

It is possible to restrict the upload process to choose only one file. Now a person can select various files from pc, Im trying to find a way to restrict this feature just to one file. Thanks in advance.

Looking to display non-image files in Gallery with logo specific to file type

When I first began looking into this, File Gallery got me much closer to solving the problem. The only issue is that the plugin only displays the generic non-image icon when I upload a file. Does anyone know of a pre-existing plugin that would either work alongside File Gallery or in place of it to […]

Metabox with multiple fields added by user and upload box

I’m trying to build system, where user can add as many fields as he needs to the post. I’m using code from this thread. Everythings works fine, except I can’t get my upload working. Here’s code I’ve added inside foreach loop in dynamic_inner_custom_box() function: <input class=”upload_file” type=”text” size=”45″ id=”items[%1$s][picture]” name=”items[%1$s][picture]” value=”%6$s” /> <input class=”upload_button button” […]