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
7 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
15 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
16 views

Password-protected page files are still accessible to the public [on hold]

I know this probably sounds pretty basic/easy but I'm trying to avoid a few things if possible: using plugins that require individual files to be password protected as the client would have to go ...
0
votes
0answers
7 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
15 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
0answers
12 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 ...
0
votes
0answers
16 views

Uploading an image to the media library causes problems

I'm currently trying to upload an image to the WordPress media library programmatically. The problem is, that when I check the media library, there is no thumbnail showing up and the file size is also ...
0
votes
1answer
12 views

Wordpress 4.4.2 upload give error, can't write is upper directory allowed to be written

I searched around for this problem en found a lot of ideas most has to do with write access. The idea is: Put all directories in the wp-content/upload to 744 if not work to 755 and all the files to ...
0
votes
1answer
26 views

How to allow .xls file uploads?

I am getting the following error when trying to upload a xls file. Sorry, this file type is not permitted for security reasons. Tried plugin wp-extra file type and there is no option to choose an ...
0
votes
0answers
9 views

How to bulk upload images in separate sub-directories into Media Library?

A client has organised his product catalogue into folders for category/product-name/size/color, with a photo in each and of each branch of the tree. Is there an easy way to upload them to the Media ...
0
votes
0answers
66 views

The uploaded file could not be moved to wp-content/uploads/2019/07

Uploading file at media library getting an error "The uploaded file could not be moved to wp-content/uploads/2019/07.". Please help how it resolves it.
1
vote
0answers
11 views

Restrict file types in the uploader of a wp.media frame

When creating a wp.media frame in JS, is it possible to specify allowed file types for the uploads tab? wp.media({ title: 'Pick a PDF', button: { text: 'Use this file...' }, ...
1
vote
1answer
44 views

Add media attachment filter to custom wp.media frame

Using wp.media function to create custom uploader popup I can't find argument to show attachment filters. if(typeof wp === 'undefined' || typeof wp.media === 'undefined') { return false; } var ...
0
votes
0answers
6 views

Front-end uploader logging user out when they attempt to upload image

I'm building a community site where users can post short blogs similar to Twitter. I've created a widget that has the ability for the user to make a post, regardless of where they are on the site (So ...
0
votes
0answers
40 views

How to refresh media library without refreshing page

I'm trying to update the contents of the media library after adding a new image. I use this line for this wp.media.frame.content.get().collection._requery(true); but it does not work after opening/...
0
votes
1answer
15 views

Uploads going to the root of wp-content/uploads

I have an on-again, off-again client that I just did a Wordpress/plugins/theme update for. When I opened the uploads folder, I noticed that there is one year folder from 2014 and then all the images ...
0
votes
0answers
16 views

Get file from backend server and send it to the user

I need to retrieve a file from a back-end server and deliver it to the WordPress user so they can download it. I have no problems retrieving the file with a POST: $file = file_get_contents($url, ...
2
votes
1answer
20 views

How can I save the original filename to the database?

Currently Wordpress gets an attachment name from the exif title value for images: <?php // Use image exif/iptc data for title and caption defaults if possible. } elseif ( 0 === strpos( $type, '...
0
votes
0answers
13 views

How to load images from another URL (loading WP images from another WP instance)?

I have two WP sites (two WP instances). One is the new version of the site on the main domain - sitename.com, and another one is old version which I am trying to move on subdomain archive.sitename.com ...
0
votes
0answers
11 views

Replicate Media Galley Edit view in Add Media View

I need little support of you guys with regards to one of the functionalities which are regarding the WP Media gallery, so, any help will be really helpful to me. Thanks
0
votes
1answer
43 views

Get post attachment with post id

I have a form where user can upload a file, which creates a post with an attachment. I would like to get this attachment with post id, because this is the only thing I have in my case. Is it possible ?...
0
votes
0answers
9 views

Photos won't upload to WP when on one WiFi and work fine on another

I set up a photo gallery for a friend. I can upload photos to his photo gallery from my place using my WiFI, whereas he can't at his location. I took his laptop home and I'm able to upload with his ...
0
votes
0answers
22 views

How to use MediaUpload outside of editor

I am trying to create an interface that allows users to manage data stored in posts that pertain to them without actually giving them access to the custom post type that is storing that data. ...
0
votes
0answers
20 views

delete images phisicaly as well

When I delete a media image in the media library, the file in the uploads repository is not removed, only in database so when I upload a similar I got : my-image1.png my-image1-1.png my-image1-2.png ....
1
vote
0answers
13 views

Multiple media uploader buttons target only one input on the same page

I want to call the wordpress media uploader with a button in my theme options page. The thing is that I need two upload media buttons on the same page. I'm trying to do that using javascript by ...
0
votes
2answers
36 views

FTP + Unable to locate WordPress content directory (wp-content)

When I try to upload a theme in my Wordpress website I need to fill in FTP credentials. I've installed vsftpd on my Ubuntu 18.04 server. When I connect with the credentials in my FTP client (ex. ...
0
votes
3answers
25 views

Increase .htaccess file upload without prompting error

I have a Centos Web Panel hosting and a new WordPress file. I wanted to migrate all of my local WordPress files to the live server so I installed All-in-one WP Migration. Unfortunately it can only ...
0
votes
0answers
25 views

Remove special characters from filenames

I have a website that i transfered recently from one host to another. Unfortunately when i did that, i noticed that all the images that had special characters in it lik (é, è, à, ...) weren't showing ...
0
votes
1answer
40 views

how to change wp upload directory to another domain directory

both main and second domain (addon domain ) are in same host i want to find a way to change upload directory to another directory that located in another domain root. default location (first location)...
0
votes
2answers
55 views

Why does SVG upload in Media Library fail if the file does not have an XML tag at the beginning?

I have enabled SVG uploads using this code: add_filter('upload_mimes', function($mimes) { $mimes['svg'] = 'image/svg+xml'; return $mimes; }); However, uploads of SVG files that start with the &...
0
votes
0answers
18 views

Upload file and create a page for it

I would like to make possibility for users to upload a specific files on my page. In example let it be a txt file. When txt file is uploaded I want that it will create a post/page with data about this ...
0
votes
0answers
14 views

Only allow user to download files from wp-content/uploads/ subdirectory that matches their user ID

I have this function which puts files in a /uploads/ subdirectory based on their user ID (for example, user with ID 23 uploads image.jpeg, it ends up here: /wp-content/uploads/23/image.jpeg ) and it ...
1
vote
0answers
33 views

(Woocommerce) How to add a custom page between cart and checkout with a file upload field per product item in the cart?

I am using Woocommerce. I want to add a custom page in between the cart and checkout page. In this custom page, I want to show a file upload field per product item in the cart. This has to tie into ...
0
votes
1answer
28 views

Change upload URL by mime type

I'm working on a site that has several hundred pdf files uploaded over the course of a few months. All uploads are organised in the uploads directory by year/month. The client has just decided they ...
0
votes
1answer
11 views

woocommerce with external ftp site

i am creating a site with wplms theme use woocommerce for selling part. i am trying to use another host for files(host run minimal php that use x-accel-redirect functions) and i want to limit ...
1
vote
2answers
14 views

Remove upload file types filter for admin

Does anyone know if there is a function to remove/bypass file types uploads filter (specifically for admins). I know there are plugins available but they often break or don't contain ALL the mime ...
0
votes
2answers
62 views

Upload restrictions - upload_mimes - filter: Adding multiple MIMEs for a single extension and adding multiple extensions for a single MIME type?

Trying to add certain allowed MIME types to the upload filter - currently my custom function looks like this: // allow SVG and video mime types for upload function cc_mime_types( $mimes ){ $mimes[...
0
votes
0answers
11 views

Android WP App unable to upload images

I'm trying to solve this problem, but I can't find a useful response. I've took a look in Can't upload media, permissions are correct and changed upload_path and upload_path_url to respective ...
0
votes
0answers
11 views

Images returning in uploads folder

I spent hours cleaning up old thumbnails from the wp-uploads folder but I saw they all reappeared again. What could be causing this?
0
votes
1answer
130 views

“upload_mimes” filter not working. Need to allow WOFF and WOFF2

I'm working on a theme settings page and I need to allow uploading WOFF and WOFF2 files. Getting the Sorry, this file type is not permitted for security reasons. message at this time. My code: ...
0
votes
0answers
11 views

How to upload a file to a different directory, but not its preview images?

I use a filter (in my custom plugin for my website) to force upload of files loaded with an Ultimate Member plugin form in a directory different from the default 'uploads' one. The filter works ...
0
votes
0answers
23 views

Upload image in the library doesn't show up and return 403 forbidden

When I try to upload image directly in Dashboard->Media->Add new, the image is uploaded in the upload folder but is not visible in the Media->Library and on the console I see 403 Forbidden when ...
0
votes
0answers
16 views

Metabox Upload custom MIME file type not show in Media Library

I have made a theme to allowing uploading of files like GLB format to be used in WEBGL 3D rendering in a post. Here's the code for adding supported file type: function my_myme_types( $mime_types ) { ...
0
votes
0answers
8 views

Show Files From Specific Directory in Custom Media Uploader

I want to upload/show files to/from a specicific directory in a Custom WP Media Uploader. For reference, I am using this tutorial https://github.com/smartcatdev/WP-Media-Uploader Here I only ...
0
votes
0answers
9 views

Auto insert media file when drag'n'dropping inside post

the current workflow of drag'n'dropping an image inside a wordpress post edit automatically opens the media library, and you have to click the insert into post button. Is there any way to ...
1
vote
1answer
45 views

how to get URL of media uploaded to WordPress via media_handle_sideload()

I'm trying to upload a photo from an URL then set it as the feature image of a product that user is submitting Now I can do the first part of this function the problem is I can't get the new URL of ...
0
votes
0answers
77 views

How can I programmatically add WooCommerce product photo from external URL

I searched for this but couldn't find anything I already saw this post Programmatically adding images to media library the problem is you cant get the new media url right away and put it as meta data ...
0
votes
1answer
58 views

multiple image upload using wp_enqueue_media

I have created a custom plugin and there has an image upload option. In view page: <div class="form-group"> <label class="control-label col-sm-2">Trade Photo:</label> ...
0
votes
0answers
60 views

ACF - Get file size

I'm using Advanced Custom Fields to display some uploaded items on the website, but I also need to display the size of the files. I have this code: $filevalue = get_field('file_bestand'); $filesize =...
0
votes
1answer
35 views

How to require files in a custom endpoint

I am working on a custom endpoint to handle ajax media uploads with media_handle_upload(). I have created a custom endpoint with a route that is tested and works, however when I try require the ...