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)

0
votes
1answer
9 views

get_attached_file returns wrong path after changing media upload dir

I've changed the default WordPress media upload dir (http://example.com/wp-content/uploads) to (http://example.com/uploads). Everything is OK and media files are uploading and showing correctly. But ...
-3
votes
0answers
12 views

Add Media Button on front end while click on the <a> tag [on hold]

I want to display default wp media button on front end
0
votes
0answers
6 views

How to get the return value of wp.media({ frame: 'post' }) in all cases?

When the user is in an edit.php page or post-new.php, the wp.media global is available and I want to use it to open a special insertion view that allows videos. var frame = wp.media({ frame: '...
-1
votes
0answers
8 views

Why is my add media button showing the current page?

Im modifying the my account page for Woocommerce and I have a problem, I have managed to integrate a media upload button to the my account page in Woocommerce but when clicking on it, it just opens up ...
0
votes
2answers
11 views

Check if author or uploader id of the attachment(uploaded) image is match?

I am trying to write a function to upload and delete images on frontend with dropzonejs uploader, and so far i managed to make everything work. But the problem is that i need to secure it that the ...
0
votes
1answer
19 views

Where to add my code to auto attach images to existing products

I've got this code from an answer to a previous question: add_action('add_attachment', function( $attachmentID ) { if ( ! class_exists( 'WC_Product' ) ) return; // if no WooCommerce do nothing //...
0
votes
1answer
12 views

Callback Function Not Firing On Selection In Media Uploader

I'm studying theme development and am working on some code for a media uploader that can be used to add a picture. The file frame is opening (and I've called wp_enqueue_media(); for that to be the ...
0
votes
0answers
48 views

Wordpress monthly upload directory owner set to root

This is a weird one. Wordpress by default stores uploaded media in monthly sub-directories of the uploads directory. Eg wp-content/uploads/2016/07/ On one of my sites, this directory's owner gets ...
3
votes
2answers
19 views

Delete images uploaded by 'Subscriber' role

I've inherited a very poorly designed WordPress site that in part uses BuddyPress for a directory type section. Users are able to upload profile images and 'product' images to their profile. As a ...
0
votes
0answers
14 views

Multiple file upload frontend and capture their paths

<input name="image_url" type="file" /> <input name="Submit" type="Value" value="Přidat" /> I have this in html form and this in php : if ( $_FILES['image_url']['name'] != "" ) { ...
-1
votes
0answers
10 views

With only one button, Can I upload image to media directory?

I searched and found some ways to upload images to media directory. They all need several elements. That is, one browser button, one is upload button. Can i only use one button to upload? So if i ...
1
vote
2answers
61 views

How to hide CPT files from media library programmatically

We have created a CPT which allows our customer to upload files from the admin page to a folder outside of the wp-content/uploads folder. Files are uploaded and manipulated using wp_handle_upload and ...
-2
votes
1answer
22 views

make default upload folder year/month/day wordpress without plugin [duplicate]

is there any way to change in code and make it when you click(enable) “Organize my uploads into month- and year-based folders. ” it to be default year/month/day ……… without any plugin.. Can anyone ...
2
votes
1answer
31 views

How to disable Wordpress Media resize different size version?

When i upload to a media, Wordpress is resize it to many version like that 2016-04-03_23-36-35-90x65.png 2016-04-03_23-36-35-120x80.png 2016-04-03_23-36-35-360x240.png 2016-04-03_23-36-35-480x320....
1
vote
0answers
24 views

Wordpress Media frame pre load images from ids

Im using custom metabox button to create wp media frame with this code, var frame, selection, idsField = $('#_fills_ids'); frame = wp.media({ title: 'Select or Upload Media Of ...
0
votes
1answer
17 views

WP Capabilities to Add Media, Use Media, But Not Edit Them

I just want to have role that can specifically adding media, use the existed media, but not edit OR delete them. I was looking for the capability, but I don't see it listed. Or it's really ...
0
votes
0answers
33 views

How get url of uploaded image in Wordpress (wp_handle_upload)

I added tab to admin menu page and input where it is possible to upload files. function logo_display(){?> <input type="file" name="logo" /> <?php echo get_option('logo'); ?>&...
2
votes
0answers
48 views

How to import 55k images (uploaded via FTP) into Wordpress Media libary? [closed]

I have got 55k images in my Wordpress Uploads folder which are not showing up in the Media Libary, how can I make them registered there ? I tried the plugin 'Add from Server' but there are to many ...
0
votes
0answers
22 views

Wordpress Multisite subdomains and sharing the same upload folder

Hello, We wonder if you can help resolve two doubts about Wordpress structure. We are developing a multisite in 3 languages and would like to know about these 2 things: 1. Is it possible to develop ...
0
votes
1answer
18 views

How to proxy local WP uploads folder to live site

Stack: MAMP PRO on OSX 10.11.5 (El Cap) Scenario: I'm developing a site locally, and there is already a live version of the site online. Rather than download all 4gb of the uploads folder, I'd ...
0
votes
1answer
69 views

Convert canvas to image and upload image to server

I'm working on a wordpress site about blackout poetry for a university project, where the user can blacken parts of a text to create a poem. After the user has created his poem, we need to give him ...
0
votes
2answers
50 views

Disable resizing of gif when uploaded

Animated gifs are getting more popular on the web (again) and currently there is no good tool for resizing animated gifs. So I want to disable resizing/generation of image sizes for the gif mimetype ...
0
votes
0answers
54 views

wp-admin/post.php access denied

When I publish or update posts with media (eg: image ) it results to following message. Access Denied You don't have permission to access "http://example.com/wp-admin/post.php" on this server....
0
votes
0answers
63 views

Wordpress admin can't upload photos on portfolio

I'm using "Andy Parker Theme" and a problem occurred just after the upgrading of WP to the latest version: when I want to add photos to my portfolio article, it opens the media popup allowing me to ...
6
votes
2answers
114 views

Uploading media with the REST API

I am having trouble when uploading media to a WordPress site with the JSON REST API. With the following code I can upload the photos, but no info is assigned to them, not even the name - in fact the ...
0
votes
2answers
37 views

uploading files to the uploads folder via ftp

What is the reason/s that the WordPress Media Folder, doesn't display images that were uploaded via FTP, directly to the uploads folder? Why doesn't WordPress "see" them? why do we always have to ...
0
votes
1answer
44 views

redirect to uploaded (wordpress) post after form submission from front-end

I'm using the following code to redirect the page, in order to prevent re-submission of the form. And it does fine job doing redirection to the homepage. And my website is based on the WordPress, ...
0
votes
0answers
7 views

How to retain image path of “choose file” after wrong form submission?

How to retain the image path of "choose file" after wrong form submission? thanx in advance. I have following code in the input form <input id="image" type="file" name="coupon_image" /> And ...
0
votes
0answers
20 views

upload file not image with metabox

according to Properly add an upload media button in a meta box field , this only works with upload images how we can upload files like zip or 7zip ?
0
votes
0answers
25 views

Set custom image size for Media Settings via ajax in wp-admin

I want to the user upload image custom size, but I want to possibility to change size via ajax, without go to media settings, I have two types images sizes. 700px for posts 1500px for header When ...
5
votes
2answers
75 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 |_____wp-...
1
vote
2answers
70 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 method="...
4
votes
3answers
146 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 ...
3
votes
1answer
81 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 ...
2
votes
2answers
50 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
0answers
24 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.
1
vote
1answer
24 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
1answer
13 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
30 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 ...
9
votes
0answers
276 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 ...
-1
votes
1answer
40 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
1
vote
2answers
47 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
112 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
2answers
48 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
66 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 post....
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 ...
2
votes
0answers
93 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
52 views

wp_enqueue_media() Will not load JS on the theme

I've added wp_enqueue_media() to a specific page (before including the header) on my custom theme but it flat out will not any of the JS on the page. I've already done the basic troubleshooting: ...
0
votes
1answer
25 views

How to adapt upload_dir to save files outside of WP uploads folder

We have a CPT which is used to manage various assets including image, pdf, CAD and other files. Our client would like to keep these asset files seperate from their other media files and does NOT want ...
0
votes
1answer
28 views

How to make picture appear on wordpress site shared link? [closed]

I would like to know how to make a piture appear on the thumbnail to the left of the text when I share a link of my wordpress on facebook. I dont post any images to the website, but would still like ...