Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

0
votes
0answers
12 views

How to isolate uploads folders in multisite

In my Wordpress multisite subdomains, a link to a file in uploads folder of a subdomain can be accessed regardless of what subdomain is in the url. For example, both: http://sub2.example.com/wp-...
3
votes
2answers
60 views

can not upload file .vtt on wordpress 5.0.1

I updated my site to wordpress 5.0.1, but now I can not upload file .vtt anymore. This function works properly on wordpress 4.9.8
0
votes
0answers
14 views

How to upload 3 attachments to current post?

I have a form which updates a post but when updating I need to be able to also upload 3 posts: <div class="form-group"> <input class="form-control" type="file" tabindex="3" name="custom-...
0
votes
3answers
24 views

Why “Store uploads in this folder” option is not showing in Media Settings in WordPress

I have two sites running WordPress 4.9.8 On one site I can see "Store uploads in this folder" option on in Media Settings On another site I cannot see "Store uploads in this folder" option in Media ...
0
votes
0answers
11 views

How to display all images “Uploaded By” an author

Similar posts have been made on this but not the same as I what I'm looking for. Ultimately I need a gallery to be shown on a page which displays ONLY the images uploaded by the user who is logged in....
0
votes
0answers
4 views

Wordpress Media Permalink Patterns

Is the any way to change the Media permalink patterns for all future uploads? For instance, if I upload an image titled "Contact", the media permalink will be: example.com/contact I can't for the ...
1
vote
0answers
14 views

Pass additional parameter with async upload

The following image: is showing what i want to archive. It shows the default admin upload widget in where i added a checkbox that once checked would pass an additional parameter with the async upload ...
1
vote
0answers
16 views

Limit number of images to upload in wp.media function

I need to edit a plugin for my website. The plugin uses wp.media function and lets user upload images from the frontend. A user should be able to upload multiple images. But, I need to set limit on ...
1
vote
1answer
18 views

Max file size not updating

Hi I am a beginner at WordPress and am currently trying to increase my file upload size. So far I've tried two ways: The first way was to add this to the bottom of the functions.php file: @ini_set( ...
0
votes
0answers
17 views

Azure WordPress Media Library HTTP Error

I have Azure WordPress installed, the media library's fileupload size was 8MB which I had to increase it to something larger. I brought the changes in the .user.ini file and .htaccess file. .user.ini ...
0
votes
1answer
6 views

Updating the attachment from front end doesn't show the new change

I am submitting an image to the db like this: if (isset($_POST['uploadImgCustom'])) { $myNewImg = get_post_meta($id, 'usp-file-single', true); } $attachments = get_posts(array( 'post_type' =&...
0
votes
1answer
13 views

Sanitizing existing media library paths and page links from foreign characters

I'm migrating an old WP site that supported Swedish letters ÅÄÖ in the URL, thus the site has hundrets of images containing these letters. I've searched around and found various plugins that sanitize ...
1
vote
0answers
33 views

WordPress 4.9.8 Trying to add filename over image in Media Browser

Need to add filenames of images in the media browser (not the media library, the browser when you are adding media to a post or page). I used this snippet to do that but it no longer works in ...
0
votes
0answers
10 views

When trying to add image to media library it errors

I get an error when trying to add an image to the image-library. However, the file does successfully store in uploads but I think it creates a bad record in the associated table (no not know whether ...
0
votes
1answer
21 views

limit amount of photos uploaded per cpt post

On my site I have a front end form for users to create a post and upload images. It works fine however I cant seem to figure out how to limit the number of images per post. The image attachments get ...
0
votes
0answers
14 views

I can't upload new picture keeping an old name

Maybe the title confuses a little, but here's my problem: I worked with some images to create a banner, uploading them through the Media section in the WP dashboard. Now I want to change one image ...
0
votes
0answers
21 views

Allow upload extensions multisite

In the network setting under Upload file types I have "jpg jpeg png gif mov avi mpg 3gp 3g2 midi mid pdf doc ppt odt pptx docx pps ppsx xls xlsx key mp3 ogg wma m4a wav mp4 m4v webm ogv wmv flv" In ...
0
votes
0answers
9 views

How does uploading work in Wordpress?

I have installed Wordpress on a Fedora box with php, php-mysqlnd, mariadb-server and httpd. Copying pictures from the clipboard to the post editor worked. Uploading pictures did not. I added writing ...
1
vote
1answer
16 views

Cannot upload .mp3 file to wordpress media

I tried to upload a .mp3 file and wordpress rejected and display message: Sorry, this file type is not permitted for security reasons. This happened with some .mp3 file only. I'm using wordpress 4....
0
votes
0answers
25 views

can't skip forward vidos in most browsers

I have two wordpress sites in separate folders on hosting. On one of them video plays fine, so it is not a server problem. Second site cannot navigate(rewind) back/forward all videos. Video playback ...
0
votes
0answers
63 views

Uploading media to WordPress gives an error occurred in the upload. Please try again later after chagning host

I Recently changed web host and I realized that uploading images gives the error "An error occurred in the upload. Please try again later." (because I turned on debug mode. Normally the error was "...
0
votes
0answers
20 views

Remove [gallery] shortcode and print html

When create new gallery from "Create Gallery" in Media into a plugin I need remove the shortcode [gallery ids="...,..."] that it print after loading and selecting photo action in text editor with a ...
0
votes
2answers
33 views

Upload media (image) and set the category

I want to upload an image and attach to it a category. This is my code: function upload_cover(WP_REST_Request $request) { require_once( ABSPATH . 'wp-admin/includes/image.php' ); ...
0
votes
0answers
32 views

wp_delete_attachment doesn't delete image files / doesn't work

wp_delete_attachment should delete everything that is about attachment. However if I do wp_delete_attachment( (int)$delete_attachment_id, true ); The files remain on the server (even true should ...
2
votes
1answer
39 views

getting uploaded SVG dimensions on front-end

Having successfully uploaded an SVG image through WordPress's back-end media uploader with the help of a third party plugin such as Safe SVG by Daryll Doyle, how can one get the image's dimensions ...
0
votes
1answer
23 views

Bulk upload images in upload folder does not show in media library

my website currently in staging site and I host it locally. Today, I upload some pictures from Live website to wp-content > upload folder but It does not show in Media library, however if I use ...
0
votes
1answer
16 views

Save uploads directly in the uploads folder (on a multisite)

on my current page I want my uploads to be saved directly in the uploaded folder. So their links should be something like https://example.com/wp-content/uploads/myimage.jpg instead of https://example....
1
vote
1answer
35 views

Copying uploaded images not working in wordpress

I am trying to copy an image uploaded using Contact Form 7 to the uploads directory but this only produces an empty jpeg file with 0644 permissions even though the dev directory and the uploads ...
0
votes
1answer
55 views

Rename image filename using 'media_handle_upload'

I need to rename images uploaded by the user when they post on my site. I have a code that works perfectly to save the image and make it part of the post. But I want the images to be renamed to have ...
0
votes
0answers
12 views

Replace media hook

We have developed a custom image media plugin. But now i need to force all media buttons (wordpress wide) to open our plugin not the default wordpress media viewer. How do I do that?
0
votes
2answers
45 views

Website does not reflect changes on live after uploading files via FTP

I have a Wordpress site that is already published on a domain. As I wanted to update the content of some pages, I edited the local version of my website on localhost and then uploaded the files using ...
2
votes
4answers
112 views

how to change max file upload size WordPress 4.9.8 [closed]

As the title states i have tried it with the htaccess file to change the maximum upload size and nothing i have even created a php.ini file in the root of the wordpress folder and still nothing can ...
1
vote
2answers
103 views

WordPress Issue : The uploaded file could not be moved to wp-content/uploads/

I have created a local WordPress 4.9.8 setup with PHP 7 inside a Fedora running machine. When I try to upload media into the WordPress admin, it keeps saying that The uploaded file could not be ...
1
vote
1answer
13 views

Convert (-) and (escape) signs to (_) when uploading files on wordpress media library automatically

For internal purpose, I'm looking for to convert (-) and (escape) sign to (_) automatically when we upload a file (photo,video,audio) on WordPress media library. Example: If i try to upload this 2 ...
0
votes
0answers
7 views

Add an Upload Button on Wordpress Dashboard

I have a membership site, and once a member registers, a Wordpress subscriber account is opened for them. Can someone give me a code to add to my functions.php if I want an upload button to appear ...
0
votes
0answers
18 views

In a sub-directory installation, how to serve media content from main directory?

I have moved WordPress to a subdirectory www.site.com/SUBDIR Media files are stored on www.site.com/SUBDIR/wp-content/uploads/... In WP-settings, WordPress Address (URL) is www.site.com/SUBDIR and ...
0
votes
0answers
11 views

Only allow 1 Image to be uploaded at a time

I need to disable multiple uploads at a time. I am using wp.media.frames on the front end of the site, and cannot use upload_prefilter since it would need to check a post for total uploads - which is ...
0
votes
0answers
15 views

Prevent duplicate uploads?

I created an external upload script for bulk uploading post on per line basis of course the context of this will be hard to see without seeing it, so I attached an image. Each line using my script is ...
0
votes
1answer
18 views

How To Upload Existing WordPress Site To WordPress Multisite Using SSH

I have a WordPress site that needs to move into a WordPress Multisite. I tried to find the site file to upload in wp-content/uploads/sites but I couldn't locate the file. I also tried to upload the ...
0
votes
1answer
21 views

Is there some way to find if media items are used anywhere on the site?

We have a large, old site that has long gone without care and attention, leading us to have several thousand media items, stretching back to 2014. While being tasked to clear up old media items, in ...
0
votes
0answers
22 views

Right path for renaming a file in uploads folder

I wrote a function in my functions.php which automatically renames images in the uploads folder of WordPress with [rename()][1]. I tried different solutions but I always get the error No such file ...
0
votes
0answers
35 views

Unable to upload images or files to WP

I just created a new website with Wordpress and I´m trying to upload a new template from a Zip file. When I do it, I get this message in Spanish (translation below): No se pudo crear el directorio ...
0
votes
0answers
18 views

Allowing upload of files without an extension based on MIME type

I am trying to allow the upload of files that match a specific mime type, regardless of what the extension is (and even if there is no extension at all.) Currently, wordpress is blocking these ...
0
votes
0answers
11 views

Media libarary | wp-content/uploads missing file

I've been experiencing the problem that files are either completely missing from the directory uploads or are within a different directory within uploads. For example: /wp-content/uploads/2017/09/i-...
0
votes
0answers
19 views

Compare the name of two images in wordpress

I have this function in wordpress implemented, add_action('wp_ajax_questiondatahtml', 'questiondatahtml_update'); add_action('wp_ajax_nopriv_questiondatahtml', 'questiondatahtml_update'); function ...
0
votes
1answer
28 views

How to accept images at multiple sizes and aspect ratios and display as standardized image size / ratio?

Lets say I accept guest post submissions. On the post archive page I have the image the user uploaded with the post on the left and an excerpt of the post on the right. Unless I programmatically ...
0
votes
0answers
9 views

Customize media uploader by user role

I am having a media uploader like below. I want to remove the sidebar on the left so that only portion below the visible. It can be done with css but i hoping that that there is some better way to ...
0
votes
0answers
50 views

WP multisite to use one media library for all sub-site

I am working on a Multisite project. Overview: We are creating the content/posts on main site using Visual Composer page builder plugin and then cloning that post across all sub site using a cloner ...
0
votes
1answer
57 views

Cannot upload png photo files into media library. I get a 'Could not insert post into the database'

I uploaded 7 files this morning but this afternoon all I get is the 'Could not insert post into the database' message. I am a novice at best to WordPress and I have no clue what to do.
0
votes
1answer
10 views

Images not found after migrating Wordpress website

I recently migrated my website to a new hosting platform and since uploading the files and changing the database details, some images aren't being found. I've checked the FTP and the files are in the ...