This include all question concerning the process of uploading file, whether from the WP Admin Pages or from a front end editor.

learn more… | top users | synonyms (4)

34
votes
3answers
46k views

How can I add an image upload field directly to a custom write panel?

I've added a new page under "Pages" in the wordpress admin, and added several custom fields. I'd also like to be able to add an upload image field to the page editor - is there some way to do this via ...
22
votes
4answers
6k views

Plupload Intergration in a meta-box?

I know that plupload is going to be the new upload engine for WordPress 3.3 but I was wondering if there is any documentation yet on how it integrates with WordPress. My specifically how to collect ...
17
votes
2answers
11k views

How to Protect Uploads, if User is not Logged In?

I use wordpress for a private site where users upload files. I use the "Private WordPress" to prevent access in to the site if the user is not logged in. I would like to do the same to the files ...
12
votes
4answers
9k views

Using Wordpress 3.5 Media Uploader in meta box?

Is this possible to do? I love how the new uploader works. I'm guessing it has to do with a jQuery call like the other way did. EDIT This is the code I am currently using ...
12
votes
1answer
3k views

Limit image upload to one and disable audio, video and other document file types to upload

Somebody knows some trick in Add new Post to: Disable the upload of audio, video and other filetypes. Only accept the upload of an image (jpg, png, gif). Limit the upload of each Post to only One ...
12
votes
6answers
8k views

Add a Meta Box for uploading a SECOND Featured Image?

I'd like to add a meta box to my posts and page editor that will allow me to upload an image and use it as sort of a SECOND featured image. The idea is that my client will be able to upload an image ...
12
votes
5answers
7k views

How to upload files straight to S3 without using local storage? [closed]

I'm looking for a WordPress plugin that would allow me to upload files straight to We are a development shop that actively co-creates CMS websites with clients. This means that we are often ...
12
votes
2answers
871 views

Trigger refresh for new media manager in 3.5

I'm trying to figure out how it's possible to 'refresh' the media library in the new media dialogue in 3.5. I'm adding images from an external image library to the WordPress library (via a tab/iFrame ...
11
votes
3answers
2k views

How Can I Add the “Insert From URL” Tab to a Custom 3.5 Media Uploader?

I've inserted a WP 3.5 media uploader into a widget by running this JavaScript when a button is clicked on: var frame = wp.media( { title : 'Widget Uploader', multiple : false, ...
11
votes
2answers
5k views

How does WP media uploader create the 3 different sized images, and how can I duplicate it

I have finally!! got this thing I've tried about 12 times to make and 12 different ways, but finally got it to work,... sort of. I made a custom metabox for uploading and attaching images to posts, ...
11
votes
1answer
168 views

Reject upload of wrong-sized images using the Media Uploader

I'm working on a super-strict setting for adding images to Custom Fields in the Post Edit screen. My optimal scenario would be to add a a Custom Error message when the user tries to upload an image of ...
10
votes
3answers
2k views

Load minimum WordPress environment

I made my own upload service for my website that is separate from WP, but uses WP to provide low level db functions and user verification. To do that, I include wp-load.php in my main script ...
10
votes
2answers
862 views

Specific upload folder for PDFs in custom Post type in WP multisite

I need to filter uploads to a specific folder for a custom-post type called "document" only for PDFs. So far, I have: function custom_upload_directory( $args ) { $base_directory = ...
8
votes
1answer
2k views

WordPress 3.5: Switch back to Old Media Uploader?

Is there any way to switch back to the old media uploader in WordPress 3.5? The new one is very slow for me, as I have thousands and thousands of images across my site, and I have a few plugins that ...
8
votes
1answer
1k views

How to disable generation of default image sizes for some custom post types?

I used custom post type, where 'thumbnail', 'medium' and 'large' sized not required. I need to disable this sizes and create function or plugin, where i can set, which image size is required for each ...
7
votes
2answers
4k views

How to Require a Minimum Image Dimension for Uploading?

I need a way to restrict authors from uploading a images bellow a specific dimensions. Say I only want to allow uploading images that are at least 400px x 400px. If the image size is smaller, the ...
7
votes
2answers
10k views

WordPress 3.5: Setting custom “full URL path to files” in the Media Library?

As the recent changes in WordPress 3.5 removed the "full URL path to files" option from media library I am wondering how to set this option to a custom path now? I need to set my "full URL path to ...
7
votes
2answers
2k views

Handling front-end file uploads, considering safety and ease of use

I'm looking to adapt an existing forum-like plugin which has no facility for attaching media. The plugin works as a Custom Post Type, so it would be as "simple" as attaching an image to a post. I am ...
7
votes
2answers
2k views

Give users a maximum upload capacity; limit the number of files a user can upload OR limit the number of files per upload

I'm using the Media Library on the front end of my website and I'd like to stop users from being able to spam my server by uploading an unlimited number of files. As such, I'd like to do one or maybe ...
7
votes
2answers
433 views

Which asset URLs are acceptable in a “vanilla” MU install?

Wordpress appears to let content be addressed by many URIs in an MU install. For example: example.com/wp-content/blogs.dir/5/files/picture.jpg example.com/bob/files/picture.jpg ...
7
votes
3answers
5k views

How can I bulk upload images and automatically create posts for each one at the same time?

I know how to upload multiple images into an existing post, but this is a different scenario. This is for a large catalog of assets, with each custom post-type post representing an image asset (thus a ...
7
votes
2answers
302 views

Force WordPress 3.3 to use Flash uploader

Is there any way to force WordPress 3.3 to use the old Flash uploader instead of the new HTML5 version? (you can read below if you care about why I want to do this...) I'm working with someone on ...
7
votes
5answers
666 views

Use a separate custom table (not posts) to handle file upload data

The Problem: Website that has over 100 photos per post. Could possibly swell posts-table beyond 100K entries within a few years. The Dilemma: Would much rather stick to default WP UI for handling ...
6
votes
3answers
17k views

Submit post and upload image from front-end

I am trying to do something similar to the above question. I am trying to make users post and upload images from front-end. I have already done the post form and its working. I just followed and ...
6
votes
2answers
193 views

Listing of all uploaded files in network sites

Can I list all files uploaded by users in Network sites? In Multisite each user can manage their files with their own blog but the Super admin can't monitor all the uploaded files...how can i do that? ...
6
votes
7answers
4k views

How to generate thumbnails when needed only?

I have 1000 images. How can i make wordpress to generate thumb only when needed. For example home slider will only use 10 images i dont want the other 1000 images have that thumbnail generated as its ...
6
votes
1answer
305 views

How to make “Upload files”selected by default in Insert Media?

I am frustrated having to click on the "Upload Files" constantly instead of the first choice being Upload Files in posts editor....How can i make “Upload files” selected by default instead of "Media ...
6
votes
1answer
1k views

What plugin can I use to create a list / slideshow of featured images?

I'm looking for a plugin that will allow the user to upload files, maybe 4-10 that can be used on the homepage as part of a slideshow. I can code the slideshow part myself, if necessary, but the thing ...
6
votes
1answer
883 views

Save camera info as metadata on image upload?

I am trying to have WordPress automatically save the "credit" metadata that is stored within images I am uploading. I know this would be entered as a custom post meta field using update_post_meta(). ...
6
votes
3answers
2k views

Pretty URLs for File Uploads?

Can files such as PDFs be uploaded to custom URLs? I would like to upload a PDF to www.example.com/whitepapers/pdf.pdf instead of www.example.com/wp-uploads/.... I found a plugin called WP Easy ...
6
votes
1answer
794 views

Hide “Add media”, html editor from tinymce

I have a custom post type which supports editor. (WordPress ver. 3.5) I want to customize the editor for it. Make it readonly Hide "Add Media" button Hide HTML editor Remove status bar showing word ...
6
votes
1answer
506 views

what happens to existing media files when I switch to year/month directory structure format?

A site has thousands of images in the uploads folder. ISP has threatened to shut it down because it is about to exceed server limits for the max number of files in one directory. I looked at the ...
6
votes
2answers
1k views

Media upload finished hook

I'm developing a plugin which uses wordpress's thickbox media library to handle media upload and selection. All is well but for the fact that I would like to automatically 'redirect' to the 'media ...
5
votes
6answers
7k views

Disable image attachment links

Is there a way to disable image attachment links trought a filter in functions.php or something ? I know it's possible to do it manually when you add an image to a post but I want to disable this ...
5
votes
4answers
9k views

How to increase the file size limit for media uploads?

How can I change the Maximum upload file size? I would like to be able to upload 10Mb at a time.
5
votes
2answers
2k views

How to restrict images in v3.5 Media Library modal to only those from a specific post id?

How can someone restrict the images which appear in the v3.5 Media Library modal to only show those that are attached to a specific post id? I'm creating a front-end management template that allows ...
5
votes
4answers
2k views

How to hide media uploads by other users in the Media menu?

Simply put - how might I completely hide media files uploaded by any other users other then themselves? Id like to disable access to these links & files since they are a way for non-admin users to ...
5
votes
1answer
4k views

Rename files during upload using variables

I'd like to rename files during upload and set their names to the post slug the files are being attached to, plus some random characters (a simple incremental counter will de just fine) to make the ...
5
votes
2answers
761 views

Adding a custom image upload size and making it selected by default?

How can I add a custom image upload size with a width of 550px and make it selected by default in the Add Media page? Currently, there are 4 sizes available: Thumbnail, Medium, Large and Full Size. ...
5
votes
1answer
2k views

Change upload directory for PDF files

I would like to change the upload directory for PDF files only, not for other files. For example, the PDF files would be uploaded to wp-content/uploads/pdf but other files would remain in ...
5
votes
2answers
2k views

Contact Form 7 - process form using a PHP script, instead of mailing [closed]

I want to use a form from the Contact Form 7 plugin to allow the users to upload a document to my website. The problem is that I'd like to manage those uploads from WordPress instead of receiving them ...
5
votes
2answers
459 views

WP 3.3 > Still no option to enable automatic image overwrites?

I was really excited to see the new functionality with the media manager in WP 3.3 (specifically drag and drop uploads and automatic file type recognition) But I was disheartened to see no relief in ...
5
votes
1answer
1k views

WP 3.5 media manager - how to create a working gallery frame

i am writing a plugin and after hours and hours of searching for any documentation on WP 3.5 media manager i managed to create my custom media frame that is being called when a user clicks on a custom ...
5
votes
1answer
408 views

Decrease file size upload in Media

By default, I have a 2m limit of uploads. I want to decrease this number. I found out that this code: function custom_file_max_upload_size( $file ) { $size = $file['size']; if ( $size > ...
5
votes
1answer
303 views

Which filters or actions to use after a media upload and delete?

When a media (image) is uploaded and the subsequent images are created (all the different sizes), I would like to perform a few actions. It is simple and I basically need only the new attachment ID, ...
5
votes
2answers
1k views

Using same directory for storing all uploaded images on a Wordpress network

I currently use a Wordpress network in order to run a number of sites, which all use the same template, plugins and images. As posts appear on a multiple sites, it makes sense to only upload images to ...
5
votes
1answer
72 views

Change the filename format of saved featured images

Does anyone know how I could change the way wordpress saves the featured image's additional image sizes? Right now I have the main image saving like so: test_builder_banner_2.jpg and for each ...
5
votes
1answer
3k views

simple solution for restricting access to (some) uploads/downloads

Initial Situation For a site I'm setting up I was looking into the whole field of securing uploads/downloads and restricting access to them based on user roles/capabilities. Of course I have read ...
5
votes
1answer
349 views

Image upload callback in new 3.5 media

I am using new 3.5 media uploader in my theme frontend (base on this example). It is very simple when you want to do something with images after the 'Select' button is pressed: ...
5
votes
2answers
942 views

Any plugin out there that uses WP's internal image uploader?

I'm trying to use the media uploader thing from WP (the form from the pop-up with crunching and all that), and can't figure out how. Is there any plugin out there that uses it? It would be easier to ...