docbrown/app/javascript/utilities/dragAndUpload.js
Sarthak Sharma 83b3baeac3
[deploy] 🚀 Feature: Draw Command for connect with image annotations (#10136)
* 🚀 Draw Command ready for connect [Rebase]

* revert schema changes

* fix & replace Button with theme button

* fix UI

* add test cases

* fix travis issue

* on image upload enable send button

* revert schema.db changes

* revert UI changes

* fix suggestions

* Update app/javascript/chat/draw/index.jsx

Co-authored-by: Nick Taylor <nick@iamdeveloper.com>

* update test cases

* remove commented code

* Trigger Travis CI

Co-authored-by: Narender Singh <narender2031@gmail.com>
Co-authored-by: Nick Taylor <nick@iamdeveloper.com>
2020-10-07 16:06:22 +02:00

9 lines
377 B
JavaScript

import { generateMainImage } from '../article-form/actions';
import { validateFileInputs } from '../packs/validateFileInputs';
export const dragAndUpload = (files, handleImageSuccess, handleImageFailure) => {
if (files.length > 0 && validateFileInputs()) {
const payload = { image: files };
generateMainImage(payload, handleImageSuccess, handleImageFailure);
}
};