Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 KB | None | 0 0
  1. $.fn.filepond.registerPlugin(
  2. FilePondPluginFileValidateType,
  3. FilePondPluginFileValidateSize,
  4. FilePondPluginImageResize,
  5. FilePondPluginImageExifOrientation,
  6. FilePondPluginImagePreview,
  7. FilePondPluginImageTransform,
  8. FilePondPluginImageCrop,
  9. FilePondPluginImageValidateSize,
  10. );
  11.  
  12. pond.addEventListener('FilePond:addfile', e => {
  13.  
  14. console.log('File added', e.detail);
  15.  
  16. if (e.detail) {
  17. if (e.detail.file && e.detail.file.file.name) {
  18. SetFileOnCanvas(e.detail.file.file, e.detail.file.file.name);
  19.  
  20. const inputElement = document.querySelector('input[type="file"]');
  21. FilePond.destroy(inputElement);
  22. }
  23. }
  24. });
  25.  
  26.  
  27.  
  28. pond.addEventListener('FilePond:processfile', e => {
  29. console.log('Process File COMPLETE', e.detail);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement