Hi I am adding support for CSV uploads like so : add_filter( 'upload_mimes', function ( $mime_types ) { $mime_types['csv'] = 'text/csv'; return $mime_types; }); How every when I try to upload the file I still get : Sorry, this file type is not permitted for security reasons.
I want to change the upload directory for Wordpress from project.dev/wp-content/uploads to cdn.project.dev Where subdomain cdn has DocumentRoot: HostPath/project.dev/cdn while Wordpress is located at HostPath/project.dev/public_html Any help is much appreciated.
I'm using WordPress to upload videos. I have to use WordPress to upload the videos, because they need to remain past a password protected side of the website. I have access to the WordPress content folders, so I can move media in and out from the folders, and it would be reflective on the WordPress (basically FTP). Currently, my upload limit is 200MB, and I'm having trouble uploading anything past about 30MBs. I'm getting an HTTP error. I have the …
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 I've discovered into mine yesterday question was that using $_FILES into the same function makes it overwritten so some nice dude suggested to change this variable in something different like $whatever. Both files could be managed and uploaded then but of course this is not happening …
I uploaded my first wordpress website on the server, but trying to add new media files, i have got the message "Missing a temporary folder", I tried the solutions on the forum: define('WP_TEMP_DIR',dirname(__FILE__).'/wp-content/temp/'); and created a 'temp' folder on 'wp-content', but the problem still happened .. how to fix that please ?? I tried by doing this : creating the folder on localhost with writable property then upload it to the server, but it still doesn't work
Media Library is not loading on grid view and also featured image not select any image from post and page . The progress circle keeps spinning. Due to this issue, I am not able to add any image in the post as insert image option also opens in “grid view” by default. The things I tried but not resolved my issue: Removed all plugins. Switch to twenty sixteen theme. Deleted whole wordpress installation. Installed fresh. Enabled script debug.Doesn’t show any …
I'm working on plugin that optionally manipulates uploaded content (images). I managed to add some additional fields on "Insert media" popup under "Drop files anywhere to upload" text, but I need to send those parameters with file content to async-upload.php when uploading. Pre WP v3.3, I've been using this to achive desired results: jQuery('input:text[name="custom_text"]').keyup(function() { wpUploaderInit.multipart_params.custom_text = jQuery(this).val(); });
I have a plugin I built that adds a custom media frame with the following: media_frame = wp.media.frames.media_frame = wp.media({ title: 'Select your images', button: { text: 'Use Image' }, multiple: false }); media_frame.open(); This produces a media frame that looks like this: Thus far, this has been all I needed, but my site uses Wordpress Multisite and I'm trying to add in the Network Shared Media plugin. However, Network Shared Media requires the media-frame-menu sidebar in order to access …
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 occasions, WordPress itself or some plugins directly open a window to select the local file to upload, without going through the WordPress library. I have a plugin that gives a custom path when uploading files and I need to launch a popup …
Could not insert attachment into the database. When ever I try to upload new images from WordPress media it shows me above error. Please help me why wp database shows this error.
I'm retroactively creating a post with wp_insert_post() and attaching a featuring image to it. I need the image to go into the folder that corresponds to the post's publishing date. I'm using time parameter in wp_handle_upload function that supposed to move files to the directories according to the parameter value (see in the code - $upload_date - static value for now). But right now the image moves to the current year/month folder ignoring $upload_date (Ex.: Supposed to go 2007/11, goes …
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 examining it in the Mozilla Dev Tools, there is a correct link to the image that displays the image upon clicking. However, on the migrated WP site there's an error "Couldn't load image". Directory seems correct, but image just won't load. What I tried. get_theme_file_uri() <img src="<?php echo …
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 structure is like this: - / | - wordpress | - wp-content | - uploads | - themes | - plugins | - index.php | - wp-config.php Everything was working fine until I changed the uploads directory for the uploads with this line: const UPLOADS = …
I have been using a custom code to upload images to Wordpress using custom metaboxes. Here is the code: <script type="text/javascript"> jQuery(document).ready(function( $ ) { var formfield; $('.upload_button').click(function() { $('html').addClass('Image'); formfield = $(this).prev('.upload_image'); // .attr('name'); tb_show('', 'media-upload.php?type=image&TB_iframe=true'); return false; }); // user inserts file into post. only run custom if user started process using the above process // window.send_to_editor(html) is how wp would normally handle the received data window.original_send_to_editor = window.send_to_editor; window.send_to_editor = function(html){ if (formfield) { fileurl = jQuery('img',html).attr('src'); …
When I try to upload any PNG file, I get the following error message: I have no plugin or anything installed, that could cause this. I even added the following line in order to fix this: define('ALLOW_UNFILTERED_UPLOADS', true); Since it is a local installation, security is not an issue. But still this didn't fix my problem. Any ideas what could cause this problem?
Brand new site. Not MU. No matter what I do, I cannot get a file uploaded that exceeds 2MB. I'm running a localhost server with WordPress 4.3.1 I've modified both relevant settings in the the site's php.ini as: upload_max_filesize = 64M post_max_size = 64M However, I'm still getting the message when trying to upload a plugin that's 2.5M The uploaded file exceeds the upload_max_filesize directive in php.ini. Also, when I go to "Media > Add New", I get the message: …
I'v built a custom widget that will show some sport scores. Scores are added trough custom post. When i open new custom post(scores) i enter their team names, score, scores. Now i want to add an option to show team logos next to the team name. In the last couple of days every tutorial here and elsewhere i could find didnt worked. I have no idea why, as i am newbie with all this. With many of it, upload button …
I'm building a Wordpress site in which an admin can upload a video file from post metabox. After that post is saved and the video file is attached to the post, I used ffmpeg to get the screenshot at the first second of video, then save this screenshot as a JPG file in 'tmp' directory in theme directory. Finally, I want to programmatically make this screenshot as post featured image. I use media_sideload_image function, which generally be used to get …
I'm working with Wordpress 3.3.1 on a local installation. I've uploaded an image file and it doesn't show up. The base directory is a symbolic link /var/www/wordpress/ that leads to /usr/share/wordpress/ The file exists here: /srv/www/wp-uploads/localhost/2013/01/Logo.png Wordpress thinks the file is here: http://localhost/wordpress/2013/01/Logo.png (Apache gives 404) How can I configure Apache or Wordpress to get the correct file? I'm confused because /srv/www/localhost/ contains the Wordpress files (as well). Also, I've found questions related to wp-content/uploads but this directory doesn't exist.
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 stuffs like htaccess and wp-config. @ini_set( 'upload_max_filesize' , '512M' ); @ini_set( 'post_max_size', '512M'); @ini_set( 'memory_limit', '512M' ); @ini_set( 'max_execution_time', '300' ); @ini_set( 'max_input_time', '300' ); php.ini is also modified like the above. Media uploader on backend shows I can upload 512M but its just …