We’re rewarding the question askers & reputations are being recalculated! Read more.

Questions tagged [uploads]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
11 views

How to remove “sites/1” from upload path in multisite?

I need to remove "sites/1" from the upload path for my multisite. I don't mind that all the sites end up sharing the same folder (I control all the sites). I also don't mind if I need to make some ...
0
votes
1answer
21 views

Images not displaying on site or media library

I ran into a problem with my site which is basically a portfolio site. I show my works as galleries in different pages. When I first uploaded my media, everything was fine and the site looked good. ...
0
votes
1answer
17 views

Problems with defining UPLOADS constant

I have a custom Wordpress file-structure like web-root: content (folder) uploads (folder) plugins (folder) themes (folder) ... and so on wordpress (folder) wp-admin (folder) wp-includes (folder) ....
0
votes
0answers
18 views

Wordpress uploads autocreate folder every month

In start of every month WP creating folder with month number, like /uploads/2019/11, and it's creating with ROOT, so I dont have permission to write it. If I delete it, and then it's creating when I ...
0
votes
0answers
16 views

WordPress Media After Migration

My problem is that I migrate a Joomla website to a WordPress website and I want my media files to be located to on a server other than my WordPress server. For example: server A is WordPress and ...
0
votes
0answers
25 views

Cannot display wordpress thumbnail

I wrote a simple Wordpress Plugin that upload all images inside a folder located on another server. The uploading process is working well, but for some reason when I go inside Library I have a blank ...
0
votes
0answers
14 views

Maximum file Upload

I want to ask the about this upload_max_filesize = 2M in PHP. Does it mean that the allowable file upload is 2M? then how could we or how can we upload videos more than 2M?. Thanks new to PHP.
0
votes
0answers
13 views

Multi-site: how to create directory on server to link files?

I'm wondering how I can create a directory on my server to serve files to one of my multi-site pages. With a standard wp installation, I could create a folder in my main directory /files for example. ...
0
votes
1answer
33 views

get_template_directory_uri() generates wrong path

I've uploaded a wordpress site but it's missing javascript and css. The links on the head still have the local path (src='https://localhost...') and not the new ones. So I guess it has to do with ...
0
votes
1answer
24 views

get array of files in uploads dir

We created a frontend user profile, where the user can upload files to a special directory in wp-content/uploads/ The upload is done with a plugin called ultimate member (there it will create a ...
0
votes
0answers
23 views

Hide WP Media Uploader Window

It might need some code written into functions.php if you have any idea about it. General task is to hide this modal WP uploader window And Use Simple Browser uploader instead of WP uploader Thank ...
-1
votes
0answers
31 views

CMB2 plugin - how to use standart browser uploader instead WP media uploader

Please help me resolve this... SO I am using theme that's integrated with CMB2 plugin At trying to upload img file to new post - all works BUT all uploads is over WP Media uploader... I need to ...
0
votes
0answers
13 views

How to prevent filling out the “title” field when uploading files?

How to prevent WordPress from automatically filling out the "title" field when uploading files. Not when pasting an image into content, namely when the image is uploaded to WordPress itself.
0
votes
1answer
25 views

Upload User Avatar from android to Wordpress using Rest API

I am developing an android app that give users ability to browse , register, login, post and comment to my wordpress blog using Rest Api . I am trying now to add a way for users to update their ...
1
vote
1answer
10 views

Is It Possible to Upload Certain Attachment Files To A Remote Server

My Situation I'm developing a book-store WordPress website where you can purchase and download books in PDF format. I don't want to use the local space for file storage (the host provider offers ...
0
votes
0answers
11 views

Hide all files from specific subfolder in Media Library

I use a subfolder /pdf/ in the Uploads directory, in which specific PDFs are added via another plugin: Example: /wp-content/uploads/pdf/filename.pdf Is there any simple way to hide all these files ...
0
votes
1answer
48 views

Manipulate the files uploaded via Gravity Forms before they are stored

I would like to make changes to files (for e.g. compress them into a zip) uploaded via Gravity Forms File upload field before they are uploaded to the webserver. Do you know of any hook or ...
1
vote
0answers
25 views

Error uploading image in WordPress

Hello i am trying to upload an image from a form in WordPress but i keep getting: Error loading File! without any clue as to what am doing wrong: require_once($_SERVER['DOCUMENT_ROOT'] . '/wp-load....
0
votes
0answers
25 views

How do I set a maximum upload size for a specific user role (Editor)

In Wordpress I want to be able to restrict each Editor to be able to upload 500 mb of different files in total. Is that possible? Thanks Kasper
1
vote
0answers
21 views

Force minimum image size and aspect ratio when uploading images

I'm developing a website where all a crowd of people will be uploading posts. To ensure the featured image on the post meets the requirements of other services the website will work with, I need to ...
0
votes
1answer
23 views

Big file upload give HTTP error

Just, when I go to Add New (/wp-admin/media-new.php) in Media menu, when I choose a big file, about 30 mb, upload progress bar stuck on 100% and give me an error in console: load-scripts.php?c=0&...
0
votes
0answers
16 views

Why does Wordpress convert my jpg's to png?

Anytime I upload an image to the media library it shows up as a png. And when I want to use it in a post Wordpress tells me I can't use a png. How does this happen? The site is in development and ...
0
votes
0answers
11 views

If a file input filed is empty set a variable in update_post_meta

I am running this code on the front end to update a post. the post needs be updated multiple times and can be a image or file. ... $call_21 = get_post_meta($call_id, '_call_21', true); ... ...
0
votes
0answers
27 views

All files in public_html, Cannot launch WordPress site via wp-admin

my registered URL is casualtyclaimscontainment.com I developed the site on AMPPS using the URL kriswebpg.test I uploaded site to https://dallas124.mysitehosted.com I have tried everything in my ...
0
votes
0answers
7 views

wp_update_attachment_metadata with a new filesize?

This question is related to this other problem i posted some minutes ago: wp_generate_attachment_metadata is creating an empty array I'm making a new post because the argument is a little different. ...
1
vote
0answers
41 views

wp_generate_attachment_metadata is creating an empty array

I'm making a custom wp plugin for image optimization. I'm at the point that you choose the image, the script starts to optimize and put the new image in the upload folder. The problem is that i can't ...
1
vote
0answers
26 views

Attach Thumbnail Generated from Video Upload as Featured Image for the Video

I have a custom post type "Videos" where multiple video files can be uploaded. I need to generate a thumbnail for each of these uploaded videos and attach these thumbnails as "featured image" for the ...
0
votes
0answers
16 views

Wordpress5.2.3: Better File Download Plugin validation issue

I am using Better File Download plugin for uploading a PDF file from the Admin panel. The issue is it allows all file type which listed in wp_get_mime_types() function. I want to give a validation ...
0
votes
0answers
25 views

Changing Wordpress media location and upload path to sub-domain not working

I am trying to change the location of all Wordpress media to a subdomain located above the site root ie, above public_html. I updated the wp-config setting to: define('UPLOADS', 'https://cdn.mysite....
1
vote
0answers
20 views

having issue while uploading An error occured in the upload. Please try again later

First there are lots of question with this title. I have went through all but any of this not solving my issue. I am having error while uploading image on the server Things i have tried upload ...
1
vote
0answers
17 views

Enabling users to upload files

I have a page template, where users can upload images. I use this piece of code for opening modal for media (js; only part of a code): image_frame = wp.media({ title: 'Select Media', multiple : '...
0
votes
0answers
57 views

Media library filter 'Uploaded to this post' missing in Gutenberg's image insert modal

End goal: Get the select menu input box back to allow a user to filter results. "Uploaded to this post", "Mine", "Images", "Video", etc. while inserting a Gutenberg Image block; not a gallery. I'm ...
1
vote
1answer
52 views

Rewrite rule to load images from production does nothing

I'm trying to adapt the rewrite rule given in Develop Locally, Use Images from Production to do the very same thing on my local dev site (which runs on XAMPP). This is how the development site's ....
1
vote
1answer
9 views

Can I change the URL of a video, or upload a video to a specific URL?

Let's say a video has been uploaded to: https://www.example.com/wp-content/uploads/2019/08/2017-12-21_XXX.mp4 But the URL has to be: http://www.example.com/videos/12/2017-12-21_XXX.mp4 Is there ...
1
vote
0answers
15 views

Removing included CSS file that doesn’t exist

I tried to install a premium plugin for divi icons, But it wasn’t installed successfully. There is a CSS file added to the homepage https://www.example.com/wp-content/uploads/aspengrove-icons/...
0
votes
0answers
7 views

How to enable XSPF files on upload ? & mime types issue

i'm trying to allow XSPF uploads in Wordpress through a plugin: function enable_xspf_uploads($mime_types){ $mime_types['xspf'] = 'application/xspf+xml'; return $mime_types; } add_filter( '...
0
votes
0answers
6 views

Detect when media file is uploaded or deleted

I am looking for an action hook to fire anytime a new file is uploaded or deleted from the media library, and either accept or reject the upload or deletion. I found add_attachment, but that seems to ...
1
vote
0answers
82 views

Missing a temporary folder.error when image is uploaded in admin Set temporary Directory - Wordpress 5.2.2

I am finding this error when I try to upload image in backend Missing a temporary folder. Tried setting temporary folder in wp-config.php with necessary permissions. Tried to set the temporary ...
1
vote
0answers
83 views

move_uploaded_file() not working on wordpress front end

I have working code that uploads an image from the front end and sets it as a featured image and custom field photo for a custom post type but I am unable to figure out how to set the upload path. ...
1
vote
1answer
11 views

'An error occurred in the upload. Please try again later.' for users with different roles

The problem seems to be quite common, yet most of the solutions on the net are nothing to do with my issue. So I have custom post type where on the front end users can add a post and upload an image ...
0
votes
1answer
32 views

Sudden Upload HTTP errors, PHP uploads and memory limits are already to high to my taste. Anything else?

So, let me clear everything at the start: I'm not on shared hosting. PHP upload limit is already set for 700mb. PHP memory limit is set a 512mb. Nginx, PHP-FPM and WordPress' logs tells me nothing ...
0
votes
0answers
15 views

Wordpress discards PNG file when uploading plugin file

I created a simple WordPress plugin to customize the login screen. The plugin consists of three files: index.php - adds the actions and filters functions.php - contains the functions to customize the ...
0
votes
1answer
13 views

Hook for validating and rejecting frontend image upload

I am making a plugin that checks the contents of uploaded images. Right now I am testing if I am using the right hook, so I use getimagesize() to check the image (I am aware this is not the best/most ...
0
votes
1answer
19 views

Organizing uploaded Media in permalink-based folder structure?

Wordpress seems to like storing files by year/month. This is nice, but not good enough for busy websites with loads of content. It'll be much nicer to have the folders reflect the exact same structure ...
0
votes
0answers
13 views

Contact Forms 7 with Drive File Picker

i'm wondering if it's possible to create a Drive File Picker with the plugin Contact Forms 7. I'm searching in Google's APIs about that and it's possible to have a picker on a website, but my question ...
0
votes
0answers
24 views

Why is unfiltered_upload not working despite being enabled?

According to the Codex, all that's needed to enable the unfiltered_ upload capability - i.e. the ability to upload any filetypes to the Media Library rather than just the default whitelisted ones - is ...
0
votes
0answers
11 views

Force user to input image caption when uploading an image

How can I force the user to input an image caption when uploading a picture via the Add Media button in the document edit view? See picture. It should not be possible to upload an image without a ...
0
votes
1answer
33 views

image not display in media library and thumbnail not display in post

some problems with importing images. (1) Upload folder images do not appear in the wordpress media area. The upload folder is already with 755 permission. (2) Thumbnail do not appear on the site. ...
0
votes
1answer
14 views

Multisite subdirecty added inside URL to uploaded files

I will best explain this by showing an example subsite URL: (site uses sub-directories) https://domain.com/sub1/ correct/actual uploaded file URL: https://domain.com/uploads/sites/1/2019/08/... ...
0
votes
0answers
16 views

Uploading files to dropbox through contend form

I'm looking for a way to have users upload large video files to our dropbox account through a web interface and form submit from our own website. The tutorials I've looked at which use the dropbox ...