Local file drag'n'drop onto a HTML element - Mozilla

This is a discussion on Local file drag'n'drop onto a HTML element - Mozilla ; Hello, I'm trying to detect the event when a local file is dragged and dropped onto a HTML element (textarea) inside a page in Firefox. I need to obtain dropped file's full path. I used the 'drop' handler with my ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Local file drag'n'drop onto a HTML element

  1. Local file drag'n'drop onto a HTML element

    Hello,

    I'm trying to detect the event when a local file is dragged and
    dropped onto a HTML element (textarea) inside a page in Firefox. I
    need to obtain dropped file's full path.

    I used the 'drop' handler with my extension @Firefox 3.5 but it's
    impossible to obtain file name: event.dataTransfer.getData('text/
    plain') returns an empty string for local files.

    Then I have updated to 3.6 RC1 and ran the official example below. In
    that case I am able to obtain short file name, file's content even but
    not file's full path:

    https://developer.mozilla.org/En/Dra...ansfer#Example

    Any solution?

  2. Re: Local file drag'n'drop onto a HTML element

    I will explain what my extension exactly does.

    It handles every page load, then finds every textarea in HTML and
    calls addEventListener('drop') on it.

    On Jan 9, 4:44*pm, Pavel Vlasov wrote:
    > Hello,
    >
    > I'm trying to detect the event when a local file is dragged and
    > dropped onto a HTML element (textarea) inside a page in Firefox. I
    > need to obtain dropped file's full path.
    >
    > I used the 'drop' handler with my extension @Firefox 3.5 but it's
    > impossible to obtain file name: event.dataTransfer.getData('text/
    > plain') returns an empty string for local files.
    >
    > Then I have updated to 3.6 RC1 and ran the official example below. In
    > that case I am able to obtain short file name, file's content even but
    > not file's full path:
    >
    > https://developer.mozilla.org/En/Dra...ansfer#Example
    >
    > Any solution?



+ Reply to Thread