Articles of uploads

File Upload from Frontend

I am working on a blog where user can submit his/her story from the UI. What I would like to happen is if a user submit his/her story it should be visible in the dashboard and i can get the attached document from the dashboard. All i can think about getting only a notification and […]

Using Add from Server to upload by post ID

I am using Add From Server plugin basically it imports/upload image from the server. Currently the plugin copies the images into month/year folder format but I want to change it by making it copy by the Post ID folder format instead of month/year. I have already tried using the Custom Upload Dir plugin but […]

Gravity Forms – Repeatable “File Upload” field using “gform_column_input_content” filter

I am looking to use the gform_column_input_content filter to make a repeatable file upload element. The filter modifies the HTML content of the list field column input tag. The following code provided from the docs shows how to replace the default text input with a textarea input. <?php add_filter(“gform_column_input_content_21_9_3”, “change_column3_content”, 10, 6); function change_column3_content($input, $input_info, […]

How to get future ID for post which haven't been created yet?

Calling Post ID: Lets go first with calling post id definition 🙂 This name i actually find inside a core file wp-admin/includes/media.php which means for the post you requested the media upload. Media gets attached to the that post which the media uploader gets called. Question: Well, for new post (when you click “add new […]

Change image name during uploading sequentially

Is there any way to change the image name during uploading in WordPress, but with one requirement – the new file names should be going sequentially, not in hash? There was a very similar question with a fine answer here, but the new characters are going in hash there, not in order. Thank you for […]

upload featured image from front end using wordpress add media button

I want to submit custom post from frontend. i have made form to make this happened. But i want to upload featured image form add media button of wordpress. Code is <?php /* Template Name: post submition Template Description: Use this page template to hide the sidebar. Alternatively you can simply remove all widgets from […]

Unable to Upload Images on Local Windows Install

I am having the Famous has failed to upload due to an error Unable to create directory error that soo many people run into. Any search on Google of StackExchange will result is the common, change your file/folder permissions answer. Well I am running WordPress vs 3.5.1 on Windows 7. Permissions aren’t as simple as […]

Check for file extension or mime type fails

I need to check if a uploaded file has .csv or .txt as extension and I’m doing as follow: $uploadfiles = $_FILES[‘uploadfiles’]; echo ‘<pre>’; var_dump($uploadfiles); echo ‘</pre>’; if (is_array($uploadfiles)) { foreach ($uploadfiles[‘name’] as $key => $value) { if ($uploadfiles[‘error’][$key] == 0) { $filetmp = $uploadfiles[‘tmp_name’][$key]; $filename = $uploadfiles[‘name’][$key]; $filetype = wp_check_filetype(basename($filename), null); $filetitle = preg_replace(‘/\.[^.]+$/’, […]

Why is WordPress' file upload limit so low? Is changing it harmful?

Why is the WordPress upload limit set to 2mb? This seems prohibitively low, especially when almost everyone has broadband these days. I know this can be overridden, but I was trying to find a reason it was set to 2mb in the first place, and all I could find was tutorials on how to increase […]

Media not actually deleted on disk when click “Permanent Delete”

I have uploaded a new docx and pdf through the media library and the procedure is completed successfully. I can confirm that the direct link actually works. The problem is being identified when I try to DELETE PERMANENTLY the files. By clicking on “Delete Permanently”, the file record is deleted from the media library, nevertheless […]