The problem is that this uploads the CV to the media library which I don’t really want.
Instead of using media_handle_upload
, try wp_handle_upload
.
WordPress provides us with a wp_mail
through which you can easily send an email with an attachment
Related Posts:
- How does WP media uploader create the 3 different sized images, and how can I duplicate it
- simple solution for restricting access to (some) uploads/downloads
- Saving images from Gravity Forms repeatable File Upload as post attachments [closed]
- How to get all files inserted (but not attached) to a post
- Password protect some uploaded files, so only logged-in users can view them
- How to check if an image attachment exists before uploading
- File upload from front-end form (as attachment) not working
- Add suffix to filename of uploaded images
- Check if image exists before uploading with media_sideload_image()
- Add a YouTube or Vimeo video as a post attachment?
- How can I save the original filename to the database?
- ACF attachment custom field in rest response
- How to solve: An error occured in the upload
- Images not being generated at correct size
- How to manage a big collection of files with wordpress?
- Use the WP media uploader dialog for uploading a form attachment (non-admin). Offering progress and drag and drop feedback
- Edit User Profile From Front End
- Rename attachment filenames to attachment ID on upload
- What is the way to add additional fields to attachments in 3.5+?
- How to edit attachment with media-upload.php?
- Upload iPhone video clips to blog via native WP app
- File Upload from Frontend
- How to load attachment in media library for current user?
- How can I modify the media upload form fields?
- Uploading PDF files from the front-end
- How does WordPress decides how many sizes of an image to create?
- Upload and attach to a post multiple image files [closed]
- wp_generate_attachment_metadata for non-images files
- Front end file upload returning wrong attachment url
- How to add filetype to meta value when using wp_upload_bits?
- Insert attachments from custom uploader into post (regular uploader style)
- PDF Upload from Input Error
- WordPress File Upload Form Returning Null
- Do custom post type (CPT) attachments/media store the parent post ID?
- Upload multiple files
- Using unzip_file() to get contents of file
- What is wrong with my wp_insert_attachment code?
- Adding attachment custom field metadata to TinyMCE tag
- Updating the attachment from front end doesn’t show the new change
- Add file upload with validation to custom form
- Set attachment category from file name on upload
- “Could not write file” error in wp_upload_bits function
- media_handle_upload on mix form fields (not required file input)
- _d_improd_ directory in uploads breaking site images
- Check if author or uploader id of the attachment(uploaded) image is match?
- Limit attachment caption characters
- controlling whether upload is attached to post or not
- How to force attachment size for every post
- Attachment Metadata not updated while uploading audio files
- Limit number of uploaded attachments of specific context
- How do I protect my uploads?
- How do I update attachment urls after changing site domain
- Correct Syntax for uploading files to custom directory in WordPress
- How to properly move media files and update data?
- How to assign multiple file-mime-types to extension?
- Is it possible to reorganize the WordPress uploads directory?
- Create image formats with different qualities when uploading
- How to restrict images in v3.5 Media Library modal to only those from a specific post id?
- Allow CSV files to be uploaded
- How to add more upload directories?
- Multisite, upload images directly to Amazon S3
- Impose a Maximum Limit on Image height and width upload size
- Force wordpress to see uploads folder media
- Disable TinyMCE Drag and Drop
- Allowing all/different file type uploads
- How to upload image from front end and save in media library?
- resize images not crop
- Upload image from a URL and assign it as a Featured Image to a Custom Post Type?
- Setting wp_temp_dir and permissions not working for “Missing A Temporary Folder” error
- How to hook into wordpress admin upload iframe?
- frontend upload return async-ajax.php 302
- How to overwrite wp_unique_filename logic
- How to change upload directory based on frontend form input name or ID?
- What function can I use to override the multisite maximum file size upload restriction?
- Cannot upload .mp3 file to wordpress media
- Flatten media files in uploads directory via linux terminal eliminating thumbnails?
- Interface for logged-in users to upload/download files
- Error uploading image in WordPress
- Can I change the URL of a video, or upload a video to a specific URL?
- The uploaded file could not be moved to wp-content/uploads/2019/07
- Using wp_enqueue_media() with switch_to_blog() issue
- Uploading website to Host
- Local WordPress install plugin wont upload image
- Disable new WP3.5 Media Picker
- How to: Retrieve an attachment image from post and output it
- Moving Existing images from custom directory to WP’s upload directory
- Website does not reflect changes on live after uploading files via FTP
- Programmatically Upload File to WordPress Using an API [closed]
- Uploaded images result in a file url with full path on disk appended
- Change Link to Upload folder
- Which wordpress action fires after crunching
- Workaround to upload AVIF files
- SVG not displaying in Media Tab in Backend
- Changing WordPress media location and upload path to sub-domain not working
- Picture upload issue – broken thumbnail
- Unable to upload anything to WordPress site
- Uploads from site on Server A uploaded on Server B (Like sort of CDN)
- Upload Multiple Files With Multiple Fields And With media_handle_upload
- how upload images and videos to specific folder like wp-content\uploads\folder-name
- Assign multiple categories to Media Library upload