You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

APEX Dropzone插件问题:从Lotus Notes拖拽文件功能失效

问题分析与解决方案

From what you've described, this is almost certainly a quirk of Lotus Notes' drag-and-drop behavior rather than a bug in the Dropzone 2 plugin—since you saw the same issue in Daniel Hochleitner's demo app, that rules out a problem with your implementation or the plugin itself.

Why this happens

Lotus Notes handles attachment drag-and-drop differently than Windows Explorer: instead of passing the raw file data directly, it prioritizes sending a preview thumbnail/placeholder object for the attachment. Here's how that breaks your setup:

  • In chunked mode: Dropzone can't recognize this non-standard drag object at all, so nothing happens.
  • In normal mode: The plugin misinterprets the preview thumbnail as the actual file, resulting in an empty upload. This triggers the AJAX Callback (pData) ParseError because the server receives no valid file data, leaving apex_collection empty.

Fixes you can try

  1. Force Lotus Notes to send the actual file

    • Try holding down the Ctrl key while dragging the attachment—some Notes versions switch to transferring the raw file instead of the preview when this shortcut is used.
    • As a reliable workaround: First save the Lotus Notes attachment to your local Windows filesystem, then drag the file from Explorer to the Dropzone area. This ensures the plugin gets a standard file object it can process correctly.
  2. Customize Dropzone's drag event handling
    You can override the default drag/drop events to manually parse the objects Lotus Notes sends. Notes often includes hidden properties with the real file path or data in the dataTransfer object. Here's a rough code example to get you started:

    // Target your Dropzone area
    const dropzoneArea = document.querySelector('.your-dropzone-class');
    
    dropzoneArea.addEventListener('drop', function(e) {
      e.preventDefault();
      const dragItems = e.dataTransfer.items;
    
      for (let i = 0; i < dragItems.length; i++) {
        // Check for valid file data (adjust the type check based on your Notes version)
        if (dragItems[i].kind === 'file' || dragItems[i].type === 'application/octet-stream') {
          const actualFile = dragItems[i].getAsFile();
          // Pass the real file to Dropzone
          myDropzone.addFile(actualFile);
        }
      }
    });
    

Alternative tools

If the above fixes don't work, consider these APEX-compatible upload solutions with better cross-app drag-and-drop support:

  • APEX Native File Upload: Oracle's built-in file upload component has stronger compatibility with system-level drag-and-drop, including office app attachments.
  • FilePond for APEX: A plugin built on the FilePond library, which has robust logic for parsing non-standard drag objects from various applications.
  • Custom AJAX Upload Component: Build a simple custom component using vanilla JavaScript to fully control drag event parsing, tailored to Lotus Notes' behavior.

内容的提问来源于stack exchange,提问作者Michael

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.30 03:14:07