Create New Item
×
Item Type
File
Folder
Item Name
×
Search file in folder and subfolders...
File Manager
/
wp-content
/
plugins
/
complianz-gdpr
/
settings
/
src
/
utils
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
import axios from 'axios'; export const upload = (action, file, details) => { let formData = new FormData(); formData.append("data", file); if ( typeof details !== 'undefined' ){ formData.append("details", JSON.stringify(details)); } return axios.post(cmplz_settings.admin_url+'?page=complianz&cmplz_upload_file=1&action='+action, formData, { headers: { "Content-Type": "multipart/form-data", 'X-WP-Nonce': cmplz_settings.nonce, }, }); }