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)

3
votes
5answers
6k views

Import Wordpress xml file larger than 8mb

I'm trying to import a xml file (from a previous wordpress theme) into a new wordpress theme. The problem is that the xml file is 46mb much bigger than the wordpress 8mb limit. Anyone have any ...
0
votes
0answers
38 views
+50

upload_async.php returns 500 error

When uploading a large file via the Media uploader, I get the infamous HTTP Error problem. I also have the following in the Chrome console: POST http://www.nameofsite.co/wp-admin/async-upload.php 500 ...
1
vote
1answer
269 views

Process uploads with phpThumb before generating thumbnails

I was wondering if anyone knew a way (via function, plugin, or another method) of using phpThumb to process an image on upload, and then for Wordpress to generate it's usual image sizes from both the ...
1
vote
1answer
54 views

Multi Upload In Theme Options

I need to use the WordPress media upload on a theme options page. It needs to be able to have multiple fields on one page. I have seen a few things on the site using search but nothing recent and ...
0
votes
0answers
20 views

WordPress custom setup with “uploads” folder on a separate server; and “themes” and “plugins” on two different servers

I am setting up a WordPress site on Linux (and using Amazon AWS if this matters to you), and would like to do it as follows: A separate server for the DB server A separate server for the "uploads" ...
-1
votes
1answer
36 views

Media upload error

I'm new in WP development. Suddenly I face upload error while media uploading. Even I also deactivated all plugins. Now I'm using WP latest version (4.1). After error msg the image is uploaded ...
0
votes
1answer
367 views

Specified file failed upload test. wp_upload_handle

So I managed to write a peice of code that allows me to upload a zip file, im not even sure where it gets uploaded too, and I am doing it on my localhost with apache in control (www-data). the code is ...
2
votes
1answer
603 views

Prevent users from accessing mp3s in my uploads folder?

I have mp3 players set up to play mp3s on my site. The mp3s are all being uploaded to the uploads folder. I don't want people accessing these directly, meaning I don't want people to be able to ...
0
votes
1answer
10 views

Reattach media after moving to another server

I moved WordPress from one server to another and imported everything with the standard WordPress importer. As there are a lot of posts and about 10000 images and videos, I uploaded them with FTP. ...
0
votes
1answer
23 views

What are best practices to storing uploads in Wordpress?

We've been storing all of our images using the default /year/month/day, but I'm thinking there has to be a better way to store things because everytime that I update a image or pdf. I have to reupload ...
1
vote
1answer
463 views

Share media among different domains

I have multiple Wordpress instances that live on separate domains (not a multisite installation). Since they provide the same content in different languages I'd like to share the images among these ...
0
votes
0answers
5 views

Uploading high ress images: image data does not exist

I have a reason to let users upload High Ress images. My hostingcompany doesn't allow me to upload more then 8MB. To be able to upload more MB's I did the following: I created a php.ini file and ...
0
votes
2answers
887 views

Get image post ID in media upload

I am developing a plugin that adds a Custom Post Type to my theme. It's a retail directory and the post type is a retail listing. Everything is working fine. I can upload content to the DB and then ...
0
votes
0answers
29 views

WordPress media uploader - upload tabs not hiding

I'm in the process of adding a front-end post editor to one of my sites. In doing so, I need to prevent certain users from being able to upload media. I have things "kind of" working but there are a ...
0
votes
0answers
15 views

How can i upload files to a dir other than media library

I am developing a custom plugin . That plugin need to have upload functionality which will not be images and should not be seen in media gallery . How can i set a custom upload directory which can ...
1
vote
2answers
762 views

Cropping thumbnails to specific dimensions on front end post

Probably not the best title description but here we go. One of my custom post types is for youtube videos which I take the thumb from youtube and upload it as a thumbnail for the post. Now it's easy ...
1
vote
0answers
9 views

Images uploaded to the media library has strange colors. However, in the edit screen the color is ok

This is a strange issue that I've never encountered before. When I upload this image to WordPress' media library, it comes out like this (image on the left): This is also how the image appears on ...
1
vote
2answers
31 views

What relationship determines which images appear in 'uploaded to post' in edit/add post media dialog

I would like to know which relationship in the database determines which images are displayed in the media dialog when you select 'images uploaded to post' as the search filter. I thought it would ...
0
votes
4answers
508 views

Missing a temporary folder despite settings in wp-config.php

When trying to upload media to my Wordpress 4.0 running on a shared Apache 2.2.14, PHP 5.3.2 host, I get the error message "Missing a temporary folder". I have no influence over the php.ini which is ...
0
votes
1answer
2k views

Batch upload to create posts each with one image, headline, and body text

I've been handed 300 images, 300 headlines, and 300 paragraphs by a client. Is there a way for me to place all of this in a CSV file (or other format) and upload the whole shebang into a fresh ...
0
votes
4answers
113 views

How can I reduce file upload size?

The current file upload size limit is 128MB. I want to reduce this to 1MB. I do not have access to php.ini file. I do have access to .htaccess and I could use this solution. But why isn't there a ...
0
votes
1answer
43 views

Validate Uploaded Image using WordPress' Built-in Functions?

I have a form that allows users to upload an image. I'm using the code below (which currently doesn't work) to ensure what a user uploads is valid. Can someone help me out and either update my code ...
0
votes
2answers
552 views

add_image_size() to crop images into squares?

So I know about setting custom images with add_image_size('name',X,Y,Crop?) which is cool but I need to build something that will crop images, regardless of their size, into squares. Basically, I ...
0
votes
2answers
736 views

I want to replace a media file (pdf) with an updated version

I have an updated version of a pdf file which is linked to several pages and pending posts. I want to replace the old version with the new one and keep all the existing links. Thank Priya
0
votes
0answers
23 views

Filter wp_get_attachment_image

I'm working on a new WordPress plugin, that will have to change the media library directly. For that I have to overwrite or filter the wp_get_attachment_image function, that class-wp-media-list-table ...
0
votes
0answers
9 views

Send attachments via wp_mail from temporary folder

Is it possible to send attachment via wp_mail, using temporary file, instad of uploading them to any actual folder on server? For example: <input type="file" name="file"> $attachment[] = ...
0
votes
0answers
7 views

Accessing current post data through a function

I'm using ninjaforms on my wordpress site and i have a form that is displayed on my post template. The idea behind the form is give the user a PDF file once they have completed the form. I need to ...
0
votes
1answer
843 views

How to delete file uploaded by Plupload

I follow the steps from here to integrate the plupload in metabox. Everything is working fine. But I do found one disadvantages of this guide. When I click 'Remove' link from the uploaded images, it ...
0
votes
1answer
281 views

Automatically Add Caption in image

I want to automatically add caption for each picture appears in the name of the image or the alternative text example Caption add automatic
1
vote
1answer
1k views

The uploaded file exceeds the upload_max_filesize directive in php.ini

I'm trying to upload a XML file through Wordpress Importer It shows this error, no matter what the size of the file is. Even 10kb file throws up this error. My php.ini settings were set to 100MB, ...
0
votes
1answer
265 views

Insert media button will always add into the same tinyMCE editor

I have an issue with the insert-media button. I have 2 instances of tinyMCE with both Add Media button. When I add a media in one of the two tinyMCE, all my media will go in this after, whatever which ...
2
votes
1answer
93 views

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 ...
0
votes
1answer
1k views

wp_handle_upload returns empty error array

I am trying to do an upload via ajax and really dont want to use the regular wordpress media uploader. It is too much stuff and all i want to do is upload single image. I have everything working the ...
0
votes
1answer
2k views

Organize media uploads in folders - I have a physical access to (my) server

I'm very new to Wordpress. With the help of my friend I installed Wordpress on my server and finally we have our web online. However, I would like to upload some content in media library but I need to ...
0
votes
2answers
2k views

File Upload from Frontend

I am working on a blog where user can submit his/her story from the UI. What I would like to happen is if a user submit his/her story it should be visible in the dashboard and i can get the attached ...
0
votes
1answer
258 views

How To Create A File Archive in WordPress?

I've installed WordPress for my schools website. I need create a file archive, an uploader and a file viewer for the website. The file archive would store files on the server. The uploader would ...
0
votes
1answer
295 views

Specified file failed upload test. Error When Uploading Image From Front-end

This is my code: $file_return = wp_handle_upload($_FILES['my-photo'], array('test_form' => FALSE)); if(isset($file_return['error']) || isset($file_return['upload_error_handler'])) { echo "And ...
0
votes
1answer
273 views

Upload unnattached image from frontend

I am using the below function to let users upload files from the front end. It works great except that I would like the file to NOT be attached to any post. Currently, the file is automatically ...
0
votes
1answer
1k views

Add SWF file to wordpress through custom template

I am trying to attach an swf file to my website. I have that swf file in my local system. But wordpress is not alowing me to upload the swf file into the media library. I want to add that swf to my ...
1
vote
1answer
41 views

Thumbnails produce unwanted gray pixels on white background [closed]

Is there a workaround for producing QUALITY "Featured Image" thumbnails of different sizes? WordPress produces compressed thumbnails that contain grey pixels where it should be a completely white ...
0
votes
0answers
32 views

Add custom field to edit media WP 4.0.1

I try to add a custom field for media edit from WYSIWYG. But the attachment_fields_to_edit filter does not add the field on the edit popup. When you click on a image and then click on the edit icon. ...
2
votes
3answers
671 views

Getting Details Of Uploaded Image

I'm using Wordpress' upload system (as explained here) on my plugin's admin page. I can upload an image and get this image's URL. But i need attachment ID, image caption etc. How can i reach them? I ...
0
votes
0answers
20 views

What is the best way to upload a temporary & sensitive file and then delete it when done

What is the best way to upload a temporary & sensitive file and then delete it when done. I'm writing a plugin (eventually for multisite) that allows users with a certain role to upload a .csv ...
4
votes
1answer
554 views

wp_generate_attachment_metadata returns empty array

foreach ($_FILES as $key => $file) { $uploadedImage = wp_handle_upload($_FILES[$key], $upload_overrides); pre_r($uploadedImage); if ...
0
votes
0answers
17 views

Allow guest file uploads without a plugin

I 'm building a classified web site in Wordpress. Here, I need to allow registered users as well as non-registered users(guests) to add advertisements which are custom posts in my site. All posts go ...
0
votes
0answers
7 views

Uploading two (seperate) files from the front-end

I have a (custom) post which users can submit/post from the front-end. Part of the custom post is 1) an image attachment (postImage) and 2) a PDF attachment (postFile). I am able to get the the form ...
0
votes
1answer
876 views

wordpress upload permission on nginx & ubuntu

I have a problem with wordpress upload folder permission on nginx/ubuntu VPS. keep getting the error: “asr.jpg” has failed to upload due to an error Unable to create directory uploads/2014/02. ...
0
votes
1answer
261 views

Wordpress creates unused (unregistered) image sizes

I have a news blog created on WordPress. I've set up WordPress to create 3 resized versions of images when uploading them. 315x215(featured image with cropping option enabled) 620x (to create images ...
1
vote
1answer
277 views

Retrieving JSON data in ajax request from media uploader

I'm having some problems getting my JSON data that's being passed via an ajax request. I'm trying to implement the media uploader into a plugins settings page. I've got it functioning properly using ...
0
votes
0answers
27 views

Restrict access to files to logged-in users (WP + IIS)

I have a WP site, hosted on a Microsoft IIS, server which has both a public and a private, registered users only, section. The private section is a repository of pdf files. I've granted access to the ...