Quickblox:删除内容项的问题(图片文件/ blob) [英] Quickblox: an issue in deleting content item (picture file / blob)

查看:179
本文介绍了Quickblox:删除内容项的问题(图片文件/ blob)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试删除内容项(用户的图片blob项)时,我遇到了一个奇怪的问题,在后端数据库中存储为PNG图片文件。

I am having a weird issue when I try to delete a content item (picture blob item for the user), stored as PNG picture file in the back-end database.

删除没有错误,但提供422 Unprocessable Entity。这是什么意思?在Quickblox管理面板中检查时,内容项的状态似乎正常并准备就绪。

The delete proceeds without errors, but gives "422 Unprocessable Entity". What does this mean? The status of the content item seems to be OK and ready when checked in Quickblox admin panel.

我已通过以下API调用上传内容:

I have uploaded the content with following API call:

[QBContent TUploadFile:imageData fileName:@"profile.png" contentType:@"image/png" isPublic:YES delegate:self];

我试图通过以下API调用删除对象:

I am trying to delete the object with following API call:

[QBContent deleteBlobWithID:blobID delegate:self];

QB日志:

Performing async request: 
DELETE http://api.quickblox.com/blobs/91049.xml
headers:{
    "QB-SDK" = "iOS 1.8";
    "Qb-Token" = b9e3d1cc708c8444070544df8c642ad194509e67;
    "QuickBlox-REST-API-Version" = "0.1.1";
}
parameters:
2013-12-12 14:33:52.328 QBTestApp[21095:6b73] Request finished, response:
headers:{
    "Access-Control-Allow-Origin" = "*";
    "Cache-Control" = "no-cache";
    Connection = "keep-alive";
    "Content-Length" = 49;
    "Content-Type" = "application/xml; charset=utf-8";
    Date = "Thu, 12 Dec 2013 13:33:58 GMT";
    "QB-Token-ExpirationDate" = "2013-12-12 15:32:22 UTC";
    "QuickBlox-REST-API-Version" = "0.1.1";
    Server = "nginx/1.0.15";
    Status = "422 Unprocessable Entity";
    "X-Rack-Cache" = "invalidate, pass";
    "X-Request-Id" = 3f235134e5aa0bd012ef78e54cddc164;
    "X-Runtime" = "0.039680";
    "X-UA-Compatible" = "IE=Edge,chrome=1";
}
body:
error:
<?xml version="1.0" encoding="UTF-8"?>
<errors/>

任何想法我可能在这里做错了什么?提前谢谢(再次)! : - )

Any ideas what I might be doing wrong here? Thanks (again) in advance! :-)

推荐答案

您试图删除不存在的blob文件。请确保您在上传和创建过程完成后尝试删除blob文件(调用completedWithResult:成功结果)。

The feeling that you are trying to delete a blob file that does not exisе. Please make sure that you are trying to delete a blob file after the upload and the creation process is completed(calling completedWithResult: with successful result).

如果我能看到方法的顺序调用TUploadFile:和deleteBlobWithID:在代码中,我可以更快地帮助你。

If I could see the order of method calls TUploadFile: and deleteBlobWithID: in the code, I could help you more quickly.

这篇关于Quickblox:删除内容项的问题(图片文件/ blob)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆