ocdladefense/lib-drag-drop-upload

There is no license information available for the latest version (v1.2) of this package.

A drag and drop file uploader.

v1.2 2021-05-13 19:01 UTC

This package is auto-updated.

Last update: 2024-12-19 04:04:27 UTC


README

Drag and drop file uploader

Requires:

  1. A link tag for the dragDrop.css
  2. A script tag for the app.js
  3. A script tag for the DragDropFileUpload.js

To do:

  1. Figure out what happens if there is already a form on the page.

This is a sample of what this library is expecting to be in the page with no pre-existing form:

<div id="form-container"></div>

<link rel="stylesheet" type="text/css" href="<?php print module_path(); ?>/lib-drag-drop-upload/css/dragDrop.css" />
<script src="<?php print module_path(); ?>/lib-drag-drop-upload/js/DragDropFileUpload.js"></script>
<script src="<?php print module_path(); ?>/lib-drag-drop-upload/js/app.js"></script>

This is a sample of what this library is expecting to be in the page with a pre-existing form:

<form id="existing-form" action="/test/drag/drop/upload" method="post" multiple enctype="multipart/form-data">
    <button type="submit" id="existing-submit">Existing Submit</button>
</form>

<div id="form-container"></div>

<link rel="stylesheet" type="text/css" href="<?php print module_path(); ?>/lib-drag-drop-upload/css/dragDrop.css" />
<script src="<?php print module_path(); ?>/lib-drag-drop-upload/js/DragDropFileUpload.js"></script>
<script src="<?php print module_path(); ?>/lib-drag-drop-upload/js/app.js"></script>