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

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

问题描述

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

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天全站免登陆