sign_cloudinary_upload_request方法解析云未找到 [英] sign_cloudinary_upload_request method not found in parse cloud
问题描述
我使用cloudinary与解析。当我尝试上传视频我从我的解析云,提示以下错误。错误似乎是说,该方法 cloudinary.sign_cloudinary_upload_request(...)
不存在。任何想法如何我可能会解决这个问题?
以下是错误:
com.parse.ParseRequest $ ParseRequestException:类型错误:对象#<对象>没有方法'sign_cloudinary_upload_request
在main.js:64:33
在com.parse.ParseRequest.newPermanentException(ParseRequest.java:348)
在com.parse.ParseRESTCommand.onResponseAsync(ParseRESTCommand.java:271)
在com.parse.ParseRequest $ 3.then(ParseRequest.java:196)
在com.parse.ParseRequest $ 3.then(ParseRequest.java:192)
在bolts.Task $ 14.run(Task.java:796)
在bolts.BoltsExecutors $ ImmediateExecutor.execute(BoltsExecutors.java:105)
在bolts.Task.completeAfterTask(Task.java:787)
在bolts.Task.continueWithTask(Task.java:599)
在bolts.Task.continueWithTask(Task.java:610)
在bolts.Task $ 12.then(Task.java:702)
在bolts.Task $ 12.then(Task.java:690)
在bolts.Task $ 14.run(Task.java:796)
在java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
在java.util.concurrent.ThreadPoolExecutor中的$ Worker.run(ThreadPoolExecutor.java:587)
在java.lang.Thread.run(Thread.java:818)
下面是有问题的 main.js
部分,线路64 cloudinary.sign_cloudinary_upload_request(...)
Parse.Cloud.define(sign_cloudinary_upload_request功能(请求,响应){
如果(!request.user ||!request.user.authenticated()){
response.error(需要身份验证的用户);
返回;
}
response.success(
cloudinary.sign_cloudinary_upload_request({tags:request.user.getUsername(),eager:{crop:\"fill\",width:THUMBNAIL_WIDTH,height:THUMBNAIL_HEIGHT,gravity:\"face\"}})
);
});
如果您刚刚复制并粘贴code这是可行的。您的问题是,你似乎是打字自己的一切。所以,不,确实有是没有这样的方法 cloudinary.sign_cloudinary_upload_request
该方法 cloudinary.sign_upload_request
参考示例:的https://github.com/cloudinary/cloudinary_parse/blob/master/sample/cloud/main.js
Parse.Cloud.define(sign_cloudinary_upload_request功能(请求,响应){
如果(!request.user ||!request.user.authenticated()){
response.error(需要身份验证的用户);
返回;
}
response.success(
cloudinary.sign_upload_request({标签:request.user.getUsername(),渴望:{作物:补,宽度:150,高度:100,严重性:面子}})
);
});
只需复制和粘贴:保持简单
。I am using cloudinary with Parse. When I try to upload a video I am getting the below error from my Parse cloud. The error seems to be saying that the method cloudinary.sign_cloudinary_upload_request(…)
does not exist. Any ideas how I might fix this?
Here is the error:
com.parse.ParseRequest$ParseRequestException: TypeError: Object #<Object> has no method 'sign_cloudinary_upload_request'
at main.js:64:33
at com.parse.ParseRequest.newPermanentException(ParseRequest.java:348)
at com.parse.ParseRESTCommand.onResponseAsync(ParseRESTCommand.java:271)
at com.parse.ParseRequest$3.then(ParseRequest.java:196)
at com.parse.ParseRequest$3.then(ParseRequest.java:192)
at bolts.Task$14.run(Task.java:796)
at bolts.BoltsExecutors$ImmediateExecutor.execute(BoltsExecutors.java:105)
at bolts.Task.completeAfterTask(Task.java:787)
at bolts.Task.continueWithTask(Task.java:599)
at bolts.Task.continueWithTask(Task.java:610)
at bolts.Task$12.then(Task.java:702)
at bolts.Task$12.then(Task.java:690)
at bolts.Task$14.run(Task.java:796)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
Here is the main.js
portion in question, line 64 is cloudinary.sign_cloudinary_upload_request(…)
Parse.Cloud.define("sign_cloudinary_upload_request",function(request,response){
if(!request.user || !request.user.authenticated()){
response.error("Needs an authenticated user");
return;
}
response.success(
cloudinary.sign_cloudinary_upload_request({tags:request.user.getUsername(),eager:{crop:"fill",width:THUMBNAIL_WIDTH,height:THUMBNAIL_HEIGHT,gravity:"face"}})
);
});
If you had just copied and pasted the code it would work. Your "problem" is that you seem to be typing everything in yourself. So no, there indeed is no such method as cloudinary.sign_cloudinary_upload_request
the method is cloudinary.sign_upload_request
refer to the sample: https://github.com/cloudinary/cloudinary_parse/blob/master/sample/cloud/main.js
Parse.Cloud.define("sign_cloudinary_upload_request", function(request, response) {
if (!request.user || !request.user.authenticated()) {
response.error("Needs an authenticated user");
return;
}
response.success(
cloudinary.sign_upload_request({tags: request.user.getUsername(), eager: {crop: "fill", width: 150, height: 100, gravity: "face"}})
);
});
Just copy and paste: keep it simple.
这篇关于sign_cloudinary_upload_request方法解析云未找到的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!