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)

-1
votes
1answer
25 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
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 ...
0
votes
1answer
9 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
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
0answers
23 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
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
0answers
13 views

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 ...
0
votes
1answer
38 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
0answers
22 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 ...
-1
votes
0answers
17 views

Advanced User Profile : Paragraph Fields, PDF Upload [closed]

I'm trying to create a Site were my customers can create their profile with all sorts of personal information. One of the fields I need is various PDF or DOCX upload fields, that can contain the ...
0
votes
0answers
31 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. ...
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 ...
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
0answers
26 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 ...
0
votes
0answers
22 views

Make “Add Media” button lead to “Upload” tab instead of “Gallery” by defaut

Whenever I upload a media to wordpress, I have to click the Add Media button, switch to the Upload Tab, then select my file. Is there a way to make the Upload tab the default tab for the media ...
0
votes
0answers
41 views

Failed to load resource at admin screen

So I've done Wordpress clean install in a live server. Everything looks fine and seems to work. However, if I go to the admin's edit page or post and try to add or change the featured image, the Media ...
0
votes
0answers
16 views

media_sideload_image uploads an image multiple times!

i want to upload an image programmatically into wordpress media library and then attach it to a post! i found media_sideload_image function in wordpress codex but when i use it in functions.php file, ...
0
votes
0answers
27 views

Could not upload image in admin panel while making a plugin in wordpress

I am trying to make simple plugin but my problem is image which can not appear in admin panel... Here is my code: class DM_options{ public $options; public function __construct(){ ...
1
vote
2answers
45 views

Why images/photos after being uploaded to my wordpress site get slightly blurry?

I am trying to figure out the problem stated in the title. Every image/photo I upload to my wordpress site gets slightly blurry. I format them according to my wp theme requirements, however after the ...
0
votes
2answers
46 views

Unable to upload images using the Media Library

I have had a site that has been working perfectly for the past few months. Then all of a sudden when I go to upload an image via the Media Manager on the Admin Dashboard I get a 500: Internal Server ...
1
vote
1answer
57 views

Upload a json file in php

I'm trying to upload a json file through PHP. This is the code that i have yet. if( isset( $_POST['upload'] )) { $target = "/"; $target = $target . basename( $_FILES['upload']['name']) ; ...
0
votes
1answer
27 views

Private file system for attachments

Is there a way to make an attachment private? This also includes moving the files to a separate folder for private attachments, even if it's a sub-folder of uploads, to restrict anonymous access ...
2
votes
0answers
25 views

How to get profile user id when uploading image via media uploader on profile page

I have a PlugIn which lets a user upload an image to a user profile in the backend. Now I want to access the user id in the uploader to change the filename of the uploaded image. On the user profile ...
1
vote
0answers
16 views

How to get the last selected media alignment setting?

The default media uploader for inserting into a post retrieves the last selected alignment setting that was used. How do I retrieve that for use in my plugin?
0
votes
2answers
46 views

Theoretical limit of upload file size [duplicate]

I want to setup a CMS on WP, which should contain a page, allowing to upload and download big files. We are expecting to use an Apache-server running on Ubuntu. Assuming to adjust values, such as ...
0
votes
0answers
20 views

Upload image by url

I want upload image by url: $upload_dir = wp_upload_dir(); $image_data = file_get_contents($post_photo_url); $filename = basename($post_photo_url); if(wp_mkdir_p($upload_dir['path'])) $file = ...
0
votes
0answers
12 views

Proper permisssions for a file in uploads directory to be viewable by admin but not by public

What would be the proper permission to set for a file in wp-content/uploads so that it is not publicly viewable but can be accessed when logged into the admin area? Example - a user uploads a photo ...
0
votes
1answer
29 views

Post Type Upload Directory - {post_type}_upload_dir filter

I'm working with modifying the upload directory depending on which post type is being uploaded to. I've ran across this question: Post type specific upload folder in 3.5 and one of the lines confused ...
0
votes
1answer
21 views

What's the database relationship between a post and its attachments

I'm creating a custom import script to migrate CSV data into wordpress. Each post has a series of attachments that must come with it. Following chapter 14 (importing via a custom mysql script) in the ...
0
votes
0answers
30 views

wp_upload_bits - define (sub)folder / (sub)directory before filename?

I have this code for a plugin I'm using. $comment_image_file = wp_upload_bits( $title . $user->user_login . $comment_id . '.' . $file_ext, null, file_get_contents( $_FILES[ $comment_image_id ...
0
votes
2answers
70 views

How to check if uploaded file is .pdf not .jpeg?

I use a function in my theme that prevents upload of big size image files (thanks to @fischi), but I want to apply it strictly to .jpg/.jpeg files only, because it prevents to upload .pdf files too. ...
0
votes
0answers
24 views

Is custom behaviour possible when asynchronously uploading?

I'm using Plupload and making use of wp-admin/async-upload.php to allow my website's users to upload images from the front-end asynchronously. The default behaviour of that particular script is for ...
1
vote
1answer
36 views

Change wp-content/uploads to uploads/%postname%/%image%

When uploading an image to a post, I want to change it so that it grabs the postname or post_id and places it in a folder like uploads/%postname%/ Is there a simple method of doing so? thanks
0
votes
0answers
97 views

How to resize an image server-side before upload?

I've been trying to resize an image client-side before uploading (see this question). I'm now trying to resize server-side before uploading. I think wp_handle_upload_prefilter is the filter I should ...
3
votes
0answers
144 views

How to resize image on client-side before upload?

I've been using Plupload to resize images on the client side before uploading them to the server. I've implemented a front-end form which lets the user select a file from their computer and submit it. ...
0
votes
0answers
17 views

How to change where WordPress is looking for uploaded files?

I have a multi-site setup. My main site's theme changed the uploads folder to /media, problem now, is I added a subdomain site, and when I upload a file, it still uploads to /media, and wordpress is ...
0
votes
1answer
41 views

Insert Image automatically when upload finishes wordpress media uploader

What I am trying to do is - 1) User clicks "Add Media" 2) Select an image 3) Image uploads finishes 4) Now it should insert into post automatically without pressing "Insert into post". Anywhere ...
0
votes
1answer
43 views

WordPress Media manager select file button, how to prevent hiding?

In a customized mediamanager (base versione 3.5) I would like to keep displayed the "select file" button even when some files are already uploaded in the album. Is there a simple solution?
0
votes
2answers
69 views

How to fix the orientation of images when uploading via the WordPress Media Uploader?

I've been using the Image Rotation Repair plugin to fix the orientation of images when uploading using the Media Uploader (some images taken on my camera phone are not rotated on upload, resulting in ...
0
votes
1answer
87 views

HTTP Error when trying to upload image

I'm getting an HTTP error when trying to upload an image. The image is 6MB, yet I was able to upload a 10MB image just previously. I set the following, but they did not help: ...
0
votes
0answers
32 views

WordPress Custom File upload meta box saving 0 bytes as File size

I am trying to save custom images with the custom post type , so i added a custom meta box for file upload . it seems it is working fine but when i upload any file it save the file size is 0 Bytes . I ...
0
votes
2answers
76 views

Error when upload images larger than 1024px [closed]

I'm stuck on a problem with uploading files. When I try to upload an image with 1024px or more, WordPress displays an error: Error sending. Try later. After reloading the media page, the thumb of ...
2
votes
1answer
91 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
0answers
20 views

Display all 'uploaded to' images for a page/post in 'edit' admin area

I'm using the Frontend Uploader plugin in order to allow people to allow images to posts. This allows images to be 'attached' to posts. I can display a gallery of all attached images on the frontend ...
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 ...