Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
0 answers
18 views

Hook on file upload

I need a hook or some way to detect when the window to select the file to upload is opened. I'm talking about the window that opens the browser to select the local files to upload. Context: On ...
user avatar
  • 15
0 votes
0 answers
13 views

I want to create a file storage system for different clients using plugins [closed]

I want to create a file storage system for different clients using plugins. So that individual clients can up load files and delete them. plus I need a few categories for them to upload them to. Any ...
user avatar
0 votes
1 answer
12 views

Migration to WP - Couldn't load image

Situation: I'm trying to migrate static page made with HTML/CSS/JS into Wordpress. The images won't load. They work in HTML, but when I migrate into PHP there are only alt-descriptions visible. Upon ...
user avatar
-1 votes
0 answers
23 views

Multiple domains using same WordPress, set specific uploads folder

For a project at my office I have 3 websites ending in ".nl", ".de" and ".com". They all end in the same folder but don't all have the same images and uploads. My folder ...
user avatar
  • 109
0 votes
0 answers
23 views

Cant upload larger than 100MB

I am using DO Droplet 2gb RAM Shared CPU running apache. I cant upload files larger than 100MB in the Media Uploader but I can upload LOWER than 100mb. I already tried modifying php.ini and other ...
user avatar
  • 1
1 vote
1 answer
16 views

Use custom image size in admin panel

I have add some image size like: add_image_size( 'custom-small', 600, 600 ); add_image_size( 'custom-medium', 1280, 1280 ); add_image_size( 'custom-large', 2560, 2560 ); and I have removed all the ...
user avatar
  • 13
0 votes
1 answer
28 views

Programatically upload a file to be stored inside blob field in database, NOT on filesystem

old php developer here, very.. very new to WP, so be kind. As part of a plugin, I am trying to allow files to be uploaded with the intended destination storage in a specific table. I have the ...
user avatar
0 votes
0 answers
17 views

Images not uploading on product page of woocommercr

Images on showing on product page and also on all product list. Product image not showing enter image description here
user avatar
0 votes
0 answers
12 views

How to download CSV from sub directory in uploads folder

hello guys i donot have experience working with the csv. I have a very big form i wanted to make a custom csv export for this form and a new csv is generated every time the form is submited. i am ...
user avatar
0 votes
1 answer
36 views

Double Slash After Media Path (uploads//)

After performing an SEO Audit on my client’s website I found out that several images have a double slash in their URLs. This seems to be happening just to media files, and the double slash is ...
user avatar
0 votes
0 answers
16 views

Filter Media by attached page or blog post in Library

I am trying to create a filter using restrict_manage_posts that will filter all media according the page or post type that have been attached to. Actually i need to create a filter that refers to the ...
user avatar
0 votes
0 answers
16 views

Offload Media Library to other domain on a different server

How is it possible to change the media storage of Wordpress to a subdomain on a different server. The main domain example.com running on a server pointing to IP 192.168.0.1 and I've created a ...
user avatar
0 votes
1 answer
29 views

Is it safe to upload JSON files to upload folder?

I'm using wp_upload_bits to upload JSON files to my WP's upload folder. I get the error "Sorry, this file type is not permitted for security reasons" Is it safe to upload JSON file anyway?
user avatar
3 votes
0 answers
54 views

Using the <MediaUpload /> component outside the editor. select('core') is null

I am using the WordPress components in the admin panel of my plugin and trying to make an image upload button. The button works fine and allows me to select an image, but when I select an image, I get ...
user avatar
0 votes
0 answers
20 views

Problems with uploading pictures to WordPress

When trying to upload pictures to WordPress I face big problems. Sometimes it does not work at all and sometimes I need to try several times. Some pictures I even never managed to upload. I tried ...
user avatar
  • 1
0 votes
1 answer
41 views

Why does get_dirsize return the same size?

The function below is intended to return the size of the base directory. Although additional files have been uploaded, it continues to display the same size. What am I missing? function get_space_used(...
user avatar
  • 151
0 votes
0 answers
10 views

protect files from downloading on other than my site

I have a website Files apk I store these files on a separate server How do I make downloading these files only through my site? I mean, the person who clicks on the download link on my site starts the ...
user avatar
0 votes
0 answers
36 views

Problem with inserting multiple images in gallery of each WooCommerce product programmatically

I am creating a script to programmatically add multiple images to the gallery of each WooCommerce product. The script works but only takes the first image, I'm having a hard time figuring out how to ...
user avatar
  • 1
-1 votes
1 answer
52 views

wp_temp_dir does not change the /tmp temporary default directory

I have a problem changing the temporary folder. I have have define the new temporary folder using define( 'WP_TEMP_DIR', dirname(__FILE__) . '/wp-content/temp/' ); before the line /* That's all, stop ...
user avatar
  • 3
0 votes
0 answers
118 views

Setting wp_temp_dir and permissions not working for "Missing A Temporary Folder" error

I have a problem uploading files to my main webpress site (e.g. www.main.com) and all the other pages that live in it (e.g. www.main.com/anotherpage). I know there is a method to set a temp folder ...
user avatar
  • 3
0 votes
0 answers
11 views

How to display a warning when an uploaded image is too small?

I want to display a warning when a user uploads an image with too low a resolution. I don't want to block the upload, just give a warning. The only option I see is wp_handle_upload_prefilter, but ...
user avatar
0 votes
1 answer
28 views

Use wp_handle_upload outside of a POST

I'm writing a script that will prefill my custom post type with posts. Each post has a file (zip or json) as post meta that has to be uploaded to the media folder. The problem is wp_handle_upload ...
user avatar
0 votes
0 answers
26 views

Change Link to Upload folder

I'm working on a restyling of a wordpress site, which has an upload folder of almost 120gb. I made a copy of the entire site except the upload folder, I would like to avoid it, to make quick copies of ...
user avatar
  • 1
0 votes
0 answers
16 views

How to get file object from file_attachment?

I followed this code and so far I could get the file attachment object. But I can't seem to get the file. I need the file object to upload to IPFS via Javascript. (function($){ $.extend( wp....
user avatar
0 votes
1 answer
19 views

wp not defined at wp.Uploader.prototype

I followed this code as below but it gives me the error "wp not defined". I placed the code inside footer.php in my child theme and also in functions.php but both are erroneous. (function($){...
user avatar
2 votes
1 answer
39 views

Media library storing files in uploads not folders within in uploads

I am working on a site rebuild, I need to preserve about 100 blog posts that include images. I was having issues exporting the images and I decided to just download them via FTP. However, I found a ...
user avatar
0 votes
1 answer
26 views

Does wp_get_attachment_image_src also work with non-image files?

I wish to get the file path to files other than images like PDF or TXT that are uploaded. Should I use wp_get_attachment_image_src or there's other function more suited for non-image attachments.
user avatar
1 vote
0 answers
20 views

How to enable sorting in custom media uploader in plugin

In my plugin I need a media uploader exactly like the one you see when you select a post's featured image. I managed to do almost everything with this code: media_uploader = window.wp.media({ ...
user avatar
  • 21
0 votes
0 answers
77 views

How to upload large media file in chunks, without any plugin?

How to upload large media file in chunks, without any plugin ? I have done something like this, it's uploading the file, but after uploading the media file, the uploaded file is not visible in media ...
user avatar
  • 13
0 votes
0 answers
21 views

How to locate the js code and php code for certain function?

For example, I want to debug the code for uploading an image when composing a post. I click the "Add Media" button, right-click on the "Media Library" tab, click the "Inspect&...
user avatar
  • 103
1 vote
1 answer
26 views

How can I create more upload paths, like a post corresponding to a post title folder used to store images of the same product

How can I create more upload paths, like a post corresponding to a post title folder used to store images of the same product. Because I want to make a photo album blog, the images within each post ...
user avatar
  • 11
0 votes
0 answers
28 views

PDF Upload from Input Error

I have a custom plugin that creates an input field under each post, that allows users to upload PDF files. $html .= '<input accept="application/pdf" type="file" id="...
user avatar
0 votes
1 answer
21 views

I can't set image ad fatured programatically

I have a problem when I try to set image as featured. I don't know where is the fail, I upload the image from a URL in the same server and then try to set it as featured. The code upload the image but ...
user avatar
  • 1
0 votes
0 answers
29 views

Migrating Wordpress Uploads To S3 Object Storage

I currently migrate my wordpress media to s3 bucket. Does any one know of a way to redirect all the existing image urls to the s3 bucket instead if we manually copy the files over? Could this be done ...
user avatar
0 votes
0 answers
57 views

Safe to allow json uploads

So I would need to get form on my website where people can upload json files to my site and then others can download those. But is there are security issues that could come up with this? Or any other ...
user avatar
0 votes
0 answers
139 views

Using WP-CLI "wp media import" to sync files to the media library

I'm rebuilding an old website which is 3 years old. The new website has a different sitemap and media files. For this, I have created a fresh WordPress install. However, I'd like to maintain the old ...
user avatar
  • 1,913
0 votes
1 answer
78 views

How to limit the number of images displayed in the media window?

I have a lot of images in my website, so when I open wp-admin/upload.php the server slow down. Would be possible to display only 50 images per time? I saw there is this similar question, but it works ...
user avatar
  • 127
0 votes
1 answer
32 views

Migrating media files (documents only) to a fresh install and maintaining the same directory structure

I've rebuilt an old website from scratch on a fresh install. On the old (production) website there are over 1000 PDFs and Word docs. These have been uploaded over a 3 year period via /wp-content/...
user avatar
  • 1,913
0 votes
1 answer
49 views

Cannot create new posts or upload images using media manager

My WordPress website was recently moved from one a shared hosting provider to a VPS setup at Digital Ocean. I provisioned the server myself and have WordPress running on a LAMP stack with Linux Ubuntu ...
user avatar
0 votes
0 answers
51 views

Hide media library images from other roles uploaded by admin

Can this function (https://www.role-editor.com/forums/topic/hide-specific-images-or-images-by-specific-user-role-or-specific-user-id/) be updated to hide images from other users (but not admin) in the ...
user avatar
  • 976
0 votes
0 answers
17 views

Import media (.xml) does not attribute featured images to posts

I am exporting all content from one wordpress site and importing to a clean install. The featured image of each post is not loading after being imported even though the media has been imported. The ...
user avatar
0 votes
0 answers
28 views

WordPress File Upload Form Returning Null

I know this has been mentioned a few times but I'm running short of ideas, For some reason, my form won't upload any file regardless of size or type, I've checked my php.ini, my permissions everything ...
user avatar
  • 1
0 votes
0 answers
10 views

User uploads image as "Featured Image" but WordPress resizes it?

I have a user with permissions of Author uploading an 800x238 image to WordPress as a Featured Image. When it's uploading, I can see that it uploads correctly: https://ygoprodeck.com/wp-content/...
user avatar
0 votes
0 answers
18 views

How can I update WordPress plugins or WordPress itself in all server?

I have 3 application server on AWS. if I update WordPress or plugins in one server it will update in the rest of the servers too. How can i do that??
user avatar
  • 1
0 votes
0 answers
85 views

How to add CSV upload functionality on the edit page of a Custom Post Type

So, I am creating a school website based on WordPress. In that, I need to show birthdays of students on the front page. I've created a Custom Post Type named Birthdays which will contain the list of ...
user avatar
2 votes
1 answer
72 views

AJAX action not triggering PHP function

I've used Ajax with WordPress before and got it working. However this particular case (file upload) has proven difficult. The problem seems to be that the action is not calling the php function even ...
user avatar
1 vote
2 answers
229 views

Restrict WordPress Media Library for a specific user role (users can only see/select own media)

I have 4 roles in my platform : administrator, author, editor, external I need to restrict WordPress media library access to the user’s own uploads only for one users role (external) on my platform. ...
user avatar
  • 264
0 votes
0 answers
34 views

Profile image does not upload

when i logged in "Font-End" as a user "Employer" and try to upload my profile image, it does uploaded but when i click update i got this alert error " No editor could be ...
user avatar
  • 1
0 votes
1 answer
90 views

Possible to hook into Media Library preview File column and use a custom image?

The project I'm working on, I couldn't find an easy way to have WordPress create the thumbnails sizes I needed without tons of waste, nor to simultaneously generate WebP versions, so I disabled the ...
user avatar
0 votes
1 answer
232 views

Upload PlugIn Button is missing

I want to upload a zip file but there is no option for uploading, the button is missing..
user avatar

1
2 3 4 5
39