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)

4
votes
1answer
31 views

Rename UPLOADS folder with custom WP_CONTENT_DIR

For version control purpose, our client has a WordPress app with directory structure like this: . |_____app | |_____themes | |_____plugins | |_____uploads |_____index.php |_____WordPress ...
1
vote
1answer
16 views

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 ...
0
votes
0answers
48 views

Wordpress Media URLs?

I just launched a Wordpress site after having done all of the standard procedures: moved the uploads folder, uploaded the database, and did a search and replace on all of the urls in the database. ...
2
votes
3answers
127 views

Set limit to media upload?

I am searching online and all I can see is how to increase file size for media upload, which I know how to do with php.ini, but what I need to do is limit the file size for media upload only. The ...
0
votes
2answers
2k views

Uploaded images do not show on localhost

I'm working with Wordpress 3.3.1 on a local installation. I've uploaded an image file and it doesn't show up. The base directory is a symbolic link /var/www/wordpress/ that leads to ...
0
votes
1answer
421 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 ...
3
votes
1answer
49 views

How to upload an image in the plugin's options page

My code is here.The other options working perfectly so how i can register the image and save the link in database and image in wp library. function register_team_show_case_setting() { //register ...
3
votes
1answer
900 views

Remote upload file to server B

I'm aware this might be some of the hardest coding to do ever, but thought of giving it a try. Im basically trying to detect all (mp3) filetypes uploaded through the Wordpress media upload and send ...
2
votes
2answers
29 views

How to limit file type to be upload?

I have a custom page template with a form, that any visitor of the website can upload a file. Now, I want to restrict the file type that will be upload (docx, doc and pdf only) and I limit the file ...
0
votes
1answer
1k 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 did find one disadvantage of this guide. When I click the 'Remove' link from the uploaded images, ...
0
votes
0answers
17 views

How to upload thousands of images with folder tree?

Hi We need to upload meda from FTP and when choose image from add media there show foder tree for choose media. See the attached screenshot.
2
votes
0answers
87 views

Media upload via backend doen't work after moving site

I have copied my site to a subdirectory for test purposes, everything works fine now. The only problem I have seen so far is the Media upload. When I try to upload a file I get a: Unable to create ...
1
vote
1answer
18 views

Prevent image upload unless exact size

What I am trying to do is pretty special I think. I am using WC VENDORS PRO plugin. The sellers have 4 upload areas via the front end. They can upload a profile image, a store banner, and product ...
0
votes
2answers
428 views

Unable to create directory

i have been noticing of late, after i upload my sites to a different server, i seem to have some sort of upload problem once i have copied and moved site using ftp to a new host i then can not ...
0
votes
1answer
2k 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
votes
0answers
35 views

Upload image from frontend and save it in a custom directory and DB table

I need to upload an image through a custom form on the frontend. I'm having trouble understanding the overrides in media_handle_upload and wp_handle_upload. What I want to achieve: Upload and crop ...
2
votes
2answers
648 views

wp_delete_attachment doesn't delete images in wp-content/uploads/

My function lets users delete their uploaded images in the front-end. However, they're only deleted in the Media Library. That means that they're still in wp-content/uploads/. public static ...
1
vote
2answers
663 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 ...
4
votes
1answer
1k 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 ...
1
vote
1answer
1k 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 ...
10
votes
10answers
8k 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 ...
5
votes
3answers
4k views

Get $image_id after uploading with media_sideload_image()

I want to upload a image and set it as a featured image in a post. What i tried was this: $image_id = media_sideload_image($image_url, $post_id, $post_id); update_post_meta($post_id, '_thumbnail_id', ...
0
votes
1answer
11 views

Change Wordpress Media Manager

On the previous versions the media manager was like this Newer Media Manager My Question is How can i change to the older version media manager ??
0
votes
1answer
24 views

How to get the filename from file system and create a download link?

I have a custom page template. This template have a custom form, the user can upload a file in that form and input his/her personal infos. The file will save in the file system. I want to create a ...
1
vote
2answers
3k views

Image Upload “exceeds the maximum upload size for this site”, but php.ini is correct

I'm getting an "file.png exceeds the maximum upload size for this site" error. It's saying the upload limit is 1MB when trying to upload an image that is 2.5M on WP 3.5. It is setup in multi-blog mode ...
5
votes
0answers
97 views

Physical organization of wordpress media library (Real Media Library plugin)

Introduction. In the above screenshot you can see a folder structure built with premium plugin Real Media Library. Now i want to create an extension plugin which can organize the folder structure ...
0
votes
1answer
710 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
2answers
464 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. ...
1
vote
2answers
43 views

How to safely allow user upload on CPTs?

I have a form with a WP Media to allow user uploads for a custom post type on the front end. Every time I try to upload as a user I can the message You don't have permission to attach files to this ...
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, ...
-1
votes
1answer
35 views

Is there a WP-Plugin to convert PNG to GIF? [closed]

I want to upload PNG-files, which convert wordpress in GIF-files. Is there a WP-Plugin to convert PNG to GIF? Thank you
2
votes
2answers
759 views

What might cause a POST to wp-admin/async-upload.php to return JSON >and< HTML?

In the media tab, upload of a valid image file results in display of "HTTP error". Reload of the media tab shows that the image did upload and resize, though. Browser debug tools show that on ...
0
votes
2answers
1k views

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

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 ...
3
votes
1answer
483 views

WP3.5 Media Uploader - how to make it accept multiple images?

I'm wondering how to make WP3.5 media uploader return 2 or more items in attachement? It always runs once even if 2 items are selected. The code: $('.button').on('click', function(){ var ...
0
votes
0answers
619 views

Is there any way to Integrate WordPress with Imgur for Image Hosting

I wanted to use Imgur for hosting all my WordPress website images. Till now I know how to integrate Imgur with a simple form using an upload script. The process is well explained at Subin's Now what I ...
1
vote
1answer
667 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
0
votes
0answers
52 views

Uploading .mp3 files http error - 2 “exact” files one successful other fails

I have 2 equal .mp3 files - technically different files but both exported from Audacity using the same settings and the same original audio. Exactly the same size, same content (albeit processed ...
1
vote
1answer
73 views

Upload Image in a Wordpress page using PHP

Hello awesome people of SE! :) Okay, so this is a little far-fetched but I'm trying to get a HTML form with a PHP upload script to work inside a Wordpress page. I can't use a plugin. It's supposed to ...
0
votes
1answer
21 views

Send media uploads to different directories

I am making a website for my local primary school, and I have each class page as a separate page template. Rather than have all their uploads go into the general /uploads/ folder I'd like to direct ...
0
votes
1answer
29 views

How to get attachements URL from author meta and display them?

I created a form for edit author with "WP User Frontend" and I use a custom meta field for multi upload images that can upload 6 images, with meta name 'management_certi'. My problem is I can display ...
1
vote
1answer
741 views

Why does my functions.php cause white-screen and media-library issues?

Overview: I was authoring a child-theme, and realized that functions.php was causing problems with the media-library and caused a "white-screen" to appear after editing a post. I fixed the issue by ...
1
vote
2answers
437 views

How to decrease the file size upload limit?

How do I decrease my media file size upload limit from 20 MB to 500 KB? I actually tried to follow the solution used in Decrease file size upload in Media but got a "undefined add_filter()" error. I ...
0
votes
1answer
2k 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
2answers
30 views

Using $_FILES variable into the same function for uploading images and files

I want start saying that I'm learning and I'm trying to understand the use of $_FILES and $file_handler which are making me crazy into this function to upload attachments from a frontend form. What ...
0
votes
2answers
42 views

Upload images and attachments from frontend form

I'm not very expert of wordpress and I'm trying to create a frontend form sending information to my php function through ajax. I'd need help about uploading images and files as attachments of the ...
0
votes
2answers
20 views

How to get images to show in Media when saved Via PHP

I saved a bunch pictures ( 2,000+ ) in a PHP script. I can see the list of files with adequate permissions for apache to view them in my /wp-content/2016/05 directory but They aren't showing up in my ...
1
vote
3answers
526 views

How can one update a theme on a live site without interruption?

So i have a WordPress-based site with a custom Genesis child theme. Once the site goes live, we are obviously going to need to make changes periodically to the child theme's code — modifying CSS and ...
1
vote
1answer
457 views

Add select field to media uploader that adds a class to the image

I'm looking for a way to add a <select> menu to the media uploader that will have two options: normal image, which will do nothing, and profile image, which will add a CSS class to the image if ...
1
vote
2answers
3k views

Disable media library tab for non admins in uploader screen

I am developing a plugin in which i am required to allow front end users to upload media, which I am able to do. But I don't want to let them sneak into media library which comes as tab with uploader ...
1
vote
2answers
946 views

Wordpress 3.5 Media Uploader - Only allow 1 upload and certain file types

I am trying to include the new WP Media Uploader in a Custom Meta Box. I found this tutorial: http://codestag.com/how-to-use-wordpress-3-5-media-uploader-in-theme-options/ However i am looking for ...