How to use the leanengine.File function in leanengine

To help you get started, we’ve selected a few leanengine examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github xiaokaike / magic-upload-image / server / lean-server.js View on Github external
}).on('finish', function() {
      var f = new AV.File(pubFileName, {
        // 仅上传第一个文件(多个文件循环创建)
        base64: base64data[0]
      });
      try {
        f.save().then(function(fileObj) {
          // 向客户端返回数据
          res.send({
            fileId: fileObj.id,
            mimeType: fileObj.metaData().mime_type,
            name: fileObj.name(),
            url: fileObj.url()
          });
        });
      } catch (err) {
        console.log('uploadFile - ' + err);
        res.status(502);