If u want to just change the upload directory you can use something like this:
function wp128084_upload_dir( $pathdata ) {
// change path here
return $pathdata;
}
add_filter('upload_dir', 'wp128084_upload_dir');
and again to remove this you can use this
remove_filter('upload_dir', 'wp128084_upload_dir');
Related Posts:
- Uploading Multiple Attachments From Front-End With A Description
- media_sideload_image file name?
- How to add media from front-end to an existing post?
- Can I attach a document (eg: PDF) but have a JPEG as a thumbnail?
- Creating a multi-file upload form on the front end for attachments
- exposing attachment uploading to the front end — delicate
- How to upload image from front end and save in media library?
- How to delete orphan attachments?
- Getting ID from ajax response of async-upload.php
- rename attachments based on parent-post-title on upload
- How to retrieve alt attribute for an attachment (uploaded image)?
- Email Attachment from Form Submit
- Upload multiple image with media_handle_upload with multiple file field [duplicate]
- wp_delete_attachment doesn’t delete image files / doesn’t work
- File was uploaded, but it is not shown on media section of the dashboard
- Using $_FILES variable into the same function for uploading images and files
- How to manage attachment relationships for specific posts in WP 3.5+
- Uploaded images don’t show in Media Library if there are special characters in IPTC Keywords
- Getting a taxonomy’s thumbnail url
- Check if post has attachments (not image)
- Can I use the wp media uploader for my own plugin?
- Applying automatic link class to images embedded to posts
- How to get attachment caption (get_the_excerpt gives parent post excerpt) ?
- How to get all files inserted (but not attached) to a post
- custom fields for attachments?
- Get attachment ID of author_meta image – Attachment Metadata
- How to set author for post AND post attachments
- Get attachment from post
- Change image link: wp_get_attachment_link
- Multi-line captions on attachments
- Automatically wrap post image in div
- Gel all image from certain post type
- Making images from single.php pointing to an attachment .php template
- ID of images from gallery
- Get the size (size in Kb or MB) of an featured image?
- Adding attachment file name to email link
- How to allow specific extensions and file size to wp_mail attachment?
- Get attachment file link
- How to grab the first two image attachments from a post?
- wp_insert_post featured image from library
- Get attachments by user
- attachments with tags and get_posts
- Hide “Gallery Settings” and “Insert into Post” button from Attachment window
- How can I change wordpress attachment url and protect it?
- Adding class to next/prev image link in attachment.php
- How to add multiple checkbox elements to media attachments?
- Get attachment next and previous by author only
- Edit default image attachment size
- Perform a custom (bulk) action in media view
- How to make a customized “Create Gallery” tab in the ‘Add Media’ window?
- Strip the folder path away from wp_get_attachment_url to show filename only
- Need to get array of images ID attached to post
- How to set a conditional statement for $attachment->post_excerpt, to check for value?
- wp_mail not sending attachment
- How to check if there is image title, caption, description?
- Display random gallery images and its parent post title leading to parent post permalink
- Don’t show attachments if they are inserted in post
- How to remove attachments size attribute [duplicate]
- Handling image uploads without thickbox
- How to change File URL in file uploaded to s3 compatible storage with self written plugin [closed]
- How do I get all attachments that are used in the current post, not just the children?
- Is there a move_attachment_file() function in wordpress?
- Rename attachment filenames to attachment ID on upload
- Auto create file and send it via wp_mail()
- Create page from post attachments
- how to get random media id from media gallery
- Attach pdf from dynamic url
- Is there a function for getting the post/page that an attachment is related to?
- wp_generate_attachment_metadata for non-images files
- Get Attachment Image Class by attachment id
- has_excerpt yields true but no post_excerpt when retrieved
- Automatically deactivate link for attachments
- How to add filetype to meta value when using wp_upload_bits?
- Hiding or removing file extension displayed in HTML on attachment page
- Getting attachment post using wp_get_attachment_link
- wp_mail Allow Remote Attachments from CDN
- Were attachment media settings removed from WordPress?
- Filter not applied to all image sizes
- Zip a file and add as attachment
- Nothing found in uploads folder after wp_insert_attachment
- What is wrong with my wp_insert_attachment code?
- Remove post with attachments hook
- Setting an image as post header (not featured image)
- Set attachment category from file name on upload
- How to restrict users to only access their own media files in wordpress
- wp_mail doen’t send mails whit attachment
- _d_improd_ directory in uploads breaking site images
- When inserting attachments into a blog post, how can I get WordPress to use the full filename with the extension?
- Is there a way to add Reattach and Unattach links in image gallery?
- Upload file to front-end form and send as email attachment
- Post images not displaying as attachments
- How to retrieve images contained in a post
- Upload unnattached image from frontend
- Showing the attachment for a page?
- How can we select attachements based on Caption?
- Gallery Thumbnail Layout Template
- Calling a javascript function in post edit page after attaching something to post
- Custom Fields, Media uploader, Attachments
- No attachments on contact form 7
- wp_mail attachment not working in wordpress