Allowing file types outside of WP’s defaults exposes your site to some security risks, and some hosts don’t allow certain filetypes. If your host allows these filetypes, you can use the following function in a plugin or a child theme:
function wpse_file_uploads($mime_types){
// photoshop
$mime_types['psd'] = 'image/vnd.adobe.photoshop';
// illustrator
$mime_types['ai'] = 'application/postscript';
// indesign
$mime_types['indd'] = 'application/x-indesign';
return $mime_types;
}
add_filter('upload_mimes', 'wpse_file_uploads', 1, 1);
Probably best to put this in a custom plugin because if you or another user switch themes later, you won’t want to lose this functionality.
Related Posts:
- Setting wp_temp_dir and permissions not working for “Missing A Temporary Folder” error
- wp_temp_dir does not change the /tmp temporary default directory
- Can’t write pdf file to upload directory using FPDF
- Change default uploads file using wp Skeleton
- Placing assets for external use
- WordPress HTTP Error on File upload
- Interface for logged-in users to upload/download files
- Right way to download file from source to destination
- Uploaded images result in a file url with full path on disk appended
- Where to store sensitive uploaded file?
- Creating an .ics calendar subscription service with wordpress
- Private file system for attachments
- what happens to existing media files when I switch to year/month directory structure format?
- How can I batch delete all unattached images with WP-CLI or other automated process?
- Image upload callback in new 3.5 media
- How to wp_upload_bits() to a sub-folder?
- “Add Media” only shows “Full Size” under Attachment Display Settings
- Differentiate Featured Image from Post Images upon Upload
- What might cause a POST to wp-admin/async-upload.php to return JSON >and< HTML?
- Is it possible to trigger some JavaScript when Media Popup is opened?
- What permissions does wp-content/uploads need?
- wp_handle_upload() – how to upload to a custom subdirectory within uploads
- Media Uploader: get deleted files
- How can I prevent uploading bmp image?
- Add file extension to temporary file
- Post Specific Uploader
- WordPress site stuck at 1MB for max file size
- Why “Store uploads in this folder” option is not showing in Media Settings in WordPress
- Where is Featured Image code stored in WP?
- Insert into Post button is missing for certain images
- Allowing .exe uploads (old WPSE posts no longer work)
- Prevent renaming of uploaded media
- Is it safe to delete uploaded photos if Photon (Jetpack) is activated?
- Uploading dwg files to wordpress
- Images not being generated at correct size
- Remove attachment fields from custom media uploader
- Custom “Insert into Post” button
- Switch between tabs on “Insert Media” dialog
- Site running slow on new server?
- REST API: upload media with advanced custom fields (ACF)
- Prevent a folder from being shown within the media library
- async_upload.php 500 Error when Uploading larger files with slow internet connection and latency
- WordPress Issue : The uploaded file could not be moved to wp-content/uploads/
- After moving from complete AWS setup to a standalone WordPress Server, Media/Image Files are Broken
- Upload Button in meta box not opening library
- Duplicates and other problems in Media Library
- “send_to_editor” function returning pdf file name
- WordPress Media frame pre load images from ids
- How to allow logged out users to upload media?
- Choosing images size when uploading
- add_image_size adds size, but doesn’t upload if source resolution is same as resize resolution
- why can’t upload deb package in my wordpress?
- How to upload media to specific year/month folder
- PHP error when trying to upload .mp3 files via Media Library [closed]
- “page not found” due to hat character (“^”) in a upload file name
- Provide logo in theme
- Flat media folder vs multiple directories
- Move media files from the root to date folder structure
- Deny access to uploads folder with exceptions
- Send media uploads to different directories
- Cleaning a filename after image sideloading a url that contains `%20`
- Open Media Uploader Link in single post or page
- Issue when uploading past 8MB?
- How do I force WP to set upload directory permissions correctly?
- How to limit sizes for specific upload programmatically?
- Safe to allow json uploads
- Using WP-CLI “wp media import” to sync files to the media library
- Hide media library images from other roles uploaded by admin
- SVG upload does not work
- MIME type not supporting HEIC support type in WordPress
- Unable to upload images into the media library
- How to display the maximum upload size in a WordPress single site?
- wp_handle_upload specified file failed upload test
- How to manually set an attachment in a post?
- Adding attachment custom field metadata to TinyMCE tag
- What is the hook to obtain the path and the name of the file that is being uploaded?
- Issue with upload.php with media
- Media files not loading
- Add more fields on media attachments uploaded in the dashboard
- Media import failed in the WordPress importer
- Async.upload.php (Error Message: Failed to load response data)
- Downloadable content file structure
- media_handle_upload on mix form fields (not required file input)
- Check if author or uploader id of the attachment(uploaded) image is match?
- Don’t show avatars in media library
- Problem in upload wordpress with net2ftb [closed]
- WP upload/select image , isn’t this a security issue?
- Insert media while posting is not working with new wordpress update
- Importing blog failed to download attachments from older (still online) blog
- WordPress Image Resize fails without Error Message
- Media uploader & manager: add/remove class on image with checkbox
- Displaying $_FILES data (simlar to $_POST)
- Large front end file uploads on cloud
- Is there a standard public URL convention used on a WordPress site directly to a page listing all of a user’s public content?
- How do I update attachment urls after changing site domain
- How to check if uploaded file is .pdf not .jpeg?
- Video upload from wordpress frontend
- How to turn off pages for user uploaded files?
- Get Specific Files (Only Specific Extension Type All Files in Loop ) from Media
- Simplifying ‘Add Media’ Modal in front-end Content Editor