os-js / osjs-client

OS.js Client Module
https://manual.os-js.org/
Other
31 stars 31 forks source link

Drag and drop warning in application window #153

Closed mahsashadi closed 3 years ago

mahsashadi commented 3 years ago

Hello. I am trying to make available drag and drop option for user in my application window, in below code:

import React from 'react';
export default function App ({win, proc}) {
  //const [basic] = React.useState(() => core.make('osjs/basic-application', proc, win));
  React.useEffect(() => {
    win.on('drop', (_, draggedData) => console.log('drag and drop happened'));
    // win.on('drop', (_, draggedData) => basic.open(draggedData));
  }, []);

    return (
      <p> test </p>
    );
}

But It does not work due to the following warning. Do you know what is the problem? (I am using the latest versions of packages)

Screenshot from 2021-04-17 14-42-20

andersevenrud commented 3 years ago

What's the data of the drop?

mahsashadi commented 3 years ago

A file with the aim of scanning or uploading (txt, png, exe, ...)

andersevenrud commented 3 years ago

As in, from the file manager ?

mahsashadi commented 3 years ago

Oops! Sorry. We only can drag and drop from file manager files by this code. I was trying files from my system. Thanks a lot!