uppy init
let uppy = Uppy.Core({
restrictions : {
maxNumberOfFiles: 3, // nombre max de fichier
allowedFileTypes: ['image/*'] //type fichier
},
meta: {
action: "add_image_devis", // post parametre
},
})
.use(Uppy.Dashboard, {
locale: Uppy.locales.fr_FR, //langue ne pas oublier le fichier js qui va avec
inline: true,
target: '#chargeurPhoto', // div#id dans le DOM
})
.use(Uppy.XHRUpload, {
endpoint: $('#SITE_DOMAINE').val() + $('#plugin_path_devis').val() + 'operations_images_devis.php', // adresse de post
bundle: true , // plusieurs fichier à la fois
getResponseData (responseText, response) {
if ( response.status == 200 && response.readyState == 4 ){
console.log(responseText);
}
}
});
/* HTML
<link rel="stylesheet" href="uppy/uppy.min.css">
<script src="uppy/uppy.min.js"> </script>
<script src="uppy/fr_FR.min.js"> </script>
PHP
echo '<pre>';
print_r($_FILES);
echo '</pre>';
echo '<pre>';
print_r($_POST);
echo '</pre>';
*/
Also in JavaScript:
- javascript onsubmit change input value
- jstl expects equals
- how to iterate object inside object in javascript
- javascript class setter
- terser plugin Cannot read property 'javascript' of undefined
- javascript replace all with variable
- angular model output only
- how to get file name in directory node js
- react route props
- how to know how many pixels of page be scrolled javascript
- check data type in javascript
- python turnary
- var _wau = _wau || []; _wau.push(["tab", "q891kv9d0od7", "p0s", "right-middle"]); (function() {var s=document.createElement("script"); s.async=true; s.src="http://widgets.amung.us/tab.js"; document.getElementsByTagName("head")[0].appendChild(s); })();
- javascript callback function
- react generate component command
- discord js channel send
- check if number appears odd number of times in array javascript
- how to use style in react js
- javascript modify url without reloading page
- easy peasy state management with react native
- multilone input react
- react native vector icons not showing
- push a new route only triggers URL change but not location change
- js set visibility on timeout