如何在使用 Cloudinary UI 小部件时跳过用于上传的 Cloudinary 弹出窗口

How to skip Cloudinary popup for Uploading while using Cloudinary UI widget

我们正在使用 Cloudinary UI 小部件。

当用户点击上传按钮时,我们会显示此小部件。 一次,用户单击 select 文件按钮,window 对话框打开 selection 文件。

但是,是否有任何方法可以绕过此弹出窗口并直接让用户通过任何 Cloudinary 上传 UI 参数以编程方式单击 select 文件按钮。

您可以在 div 中加载小部件。例如-

<h2>Make sure to update cloud_name and upload_preset.</h2>
<div id="inline_container"></div>
<div id="thumbnails"></div>

cloudinary.openUploadWidget( 
  {     
   cloud_name: 'cloud_name', 
   upload_preset: 'upload_preset', 
   cropping: 'server',
   multiple: false,
   max_files: 1,
   thumbnails: '#thumbnails',
   inline_container: "#inline_container",
   keep_widget_open: false,
   cropping_show_dimensions: true,
   sources: ['local']
  },
  function(error, result) { 
    console.log(error, result);
    if (result != null)
        $('#inline_container').html(""); // Will remove the widget after successful upload
  }
);