codex.transport

3.2.1 • Public • Published

⚠️ Deprecated. Use package @codexteam/ajax instead!

codex.transport

One click file uploader

Usage

transport.init({
   url: '/ajax/transport',
   multiple: true,
   accept: 'image/*',
   data: {},
   before: function () {},
   progress: function (percentage) {
       console.log(percentage + '%');
       // ...
   },
   success: function (response) {
       console.log(response);
       // ...
   },
   error: function (response) {
       console.log(response);
       // ...
   },
   after: function () {},
});

You can handle all of this event like:

  • what should happen before data sending with XMLHTTP
  • what should after success request
  • error handler

/codex.transport/

    Package Sidebar

    Install

    npm i codex.transport

    Weekly Downloads

    3

    Version

    3.2.1

    License

    MIT

    Unpacked Size

    33.3 kB

    Total Files

    9

    Last publish

    Collaborators

    • codex-team