you can plain javascript file upload for this with ionic framework.
const url="YOUR_WP_ACTION_RUL";
const form = document.querySelector('form');
form.addEventListener('submit', e => {
e.preventDefault();
const files = document.querySelector('[type=file]').files;
const formData = new FormData();
for (let i = 0; i < files.length; i++) {
let file = files[i];
formData.append('files[]', file);
}
fetch(url, {
method: 'POST',
body: formData
}).then(response => {
console.log(response);
});
});
Related Posts:
- Building a custom REST API
- Photo Gallery Plugin and Touch Devices
- Disable plugin / plugin action via theme
- How can I make add_image_size() crop from the top?
- wp.media.view.ImageDetails – Save settings as HTML5 data-* attributes for image
- WP Rest API: details of latest post including featured media url in one request?
- how to get path to images in the uploads folder to be used in a plugin
- run silex or slim with wordpress
- How to custom crop each image size?
- WP JSON REST API (Ryan McCue) how to query posts with specific meta data with ‘AND’ relation?
- Is it possible to “freeze” a WordPress blog?
- How to Delete All regenerated thumbnails but keep the original ones?
- To Disable WordPress Rest API or Not To Disable?
- How can I have two different urls for the same page that load two different templates?
- How to upload image with simple form?
- Resizing all images
- How to create gutenberg block using REST API independently or as headless way?
- Filter out results from REST API
- Using Advanced Custom Fields with WordPress and Lightbox
- Deactivate plugins only for mobile devices
- Display (and manage) webcam images?
- Way to force media uploader use custom image size
- How to authenticate custom API endpoint in WooCommerce [closed]
- Cropping, Re-sizing and Saving images from one folder to another folder in wordpress
- How to make WordPress use protocol indepentent upload files?
- Automatically Import Image into Posts from URLs on the Web?
- How can I attach images to a post from the media library?
- WordPress pods io – Rest API for fetching fields information for custom post type
- How do I change the description of the same image which is to be found in multiple instances?
- Reduce nonce lifespan
- How to select featured images for 1500 posts?
- Rename existing old uploaded images containing accented French characters (not during upload)
- Add Products to user’s ID Woocommerce
- Thumbnail with different sizes
- Store post in raw markdown format, no html?
- Multisite functions to communicate with individual site functions
- How to extract images of post and pages excluding header and logo image in wordpress?
- Use Media Uploader in Plugin
- Upload images from custom plugin using the media modal
- Disabling post images for not logged in users
- resize only height using wp_get_image_editor
- How to upload thousands of images?
- Generated Images sizes do not match Media Settings Image Size
- REST-API: extend media-endpoint
- Converting a simple plugin to be placed inside of functions.php
- Get uploaded image url
- There’s some way to add a wrapper around posted images?
- Accessing plugin functionality within WP REST API
- How to get CMB2 to show a single image at a specific size
- Layout shop page: resize images and columns
- How to crop image from center using wp_image_editor
- How to show category images (from plugin) on a regular page (page-example.php)?
- Is there a plugin which disables other plugins for mobile browers?
- Saving/Writing/Adding file to upload folder
- How to limit 1 image per post on homepage only?
- Flickr plugin that will display photos from multiple group pools? [closed]
- How to change Thumbnail size of next Gen Gallery plugin?
- How to remove the whitespace in image name and save the new file
- Getting media library popup in custom plugin admin page
- How to change ID of an attachment in wp_posts and its related tables correctly?
- Permission Check for REST API Endpoint Runs Twice?
- How do I create a full-bleed background image on text mouseover? [closed]
- Keep user’s privileges on accessing contents in JSON response
- bulk change of image setting “link to” to “link to: image url “
- Converting Attachment to Images?
- Bulk Image Uploader to create new post from each image [closed]
- Regenerate images with automatic ALT and TITLE attributes
- How to retrieve custom meta term of category taxonomy from WP Rest API?
- Is it possible to insert images directly from the server?
- How to add a random image to a post from gallery and only show one?
- Get the url of the full sized attachment image using post ID?
- Remove caching from wp_remote_get calls from custom plugin
- How to add css class to a specific set of images?
- How do I make images clickable so as to enlarge them using lightbox?
- Adding Attachment Display Settings in custom media frame
- Advanced Custom Fields
- Why isn’t “background-image: url”working with Bootstrap carousel on WP?
- Find unused images?
- How to generate video out of images via WordPress plugin
- Image gallery plugin [closed]
- I am getting error message on accessing menu-endpoint
- How can I capture Memberpress user info after signup [closed]
- Detect permalinks when passing querystring in REST API requests
- Custom REST API endpoint returns rest_no_route when called via wp-json permalink
- How to upload images to WP Panel keeping correct folder in FTP
- Inserting HTML tag with ACF into shortcode
- Images not showing after changing wp-content folder name
- Preview featured image using frontend post plugin
- How to add an image from web-link?
- Create mobile navigation header with settings integration
- How can I implement an Add to Collection function on my Image Gallery to be downloaded later?
- How to Delete all Unused photos Function
- How to resize images due to container width automatically server side/without CSS
- How can I make use of WP Mobile Detect conditions from within a plugin?
- Set featured image randomly from WordPress Database on post submission
- Howto accurately position images with maximum flexibility?
- Show an image in my header.php
- How to create a managed image repository in wordpress
- How to save generated JWT token to cookies on login?
- wp_get_post_terms is difference obj model than the one in rest api response