【问题标题】:using cloudinary api in conjunction with Epress and EJS将 cloudinary api 与 Express 和 EJS 结合使用
【发布时间】:2021-06-14 04:42:49
【问题描述】:

我正在尝试使用 cloudinary 的节点 api 直接从 EJS 模板进行未签名的上传,绕过首先将图片上传到服务器。

我已经根据文档包含了所有必需的脚本......

        <script
            src="/node_modules/jquery/dist/jquery.min.js"
            lang="text/javascript"
        ></script>
        <script 
            src="/node_modules/blueimp-file-upload/js/vendor/jquery.ui.widget.js"
            type="text/javascript"
        ></script>
        <script
            src="/node_modules/blueimp-file-upload/js/jquery.iframe-transport.js"
            type="text/javascript"
        ></script>
        <script
            src="/node_modules/blueimp-file-upload/js/jquery.fileupload.js"
            type="text/javascript"
        ></script>
        <script
            src="/node_modules/cloudinary-jquery-file-upload/cloudinary-jquery-file-upload.js"
            type="text/javascript"
        ></script>

然而,当我尝试调用云端方法时...&lt;%-cloudinary.uploader.unsigned_image_upload_tag('image_id', preset_name,{ callback: cloudinary_cors })%&gt;

44| 46|
47|

cloudinary 没有定义

谁能帮我一把?

【问题讨论】:

    标签: node.js ejs cloudinary


    【解决方案1】:

    您缺少 cloudinary 初始化步骤: $.cloudinary.config({ cloud_name: 'sample', secure: true}); 您可以关注文档以获取更多详细信息:https://cloudinary.com/documentation/jquery_integration#installation

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-09-10
      • 2016-07-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-02-16
      • 2011-08-25
      相关资源
      最近更新 更多