我使用具有主密钥的REST DELETE从Parse Server删除PFFile的请求返回404。代码:
Parse.Cloud.httpRequest({
method: 'DELETE',
url: profilePhotoLargeSizedImageURL,
headers: {
'X-Parse-Application-Id': parseConfig.appId,
'X-Parse-Master-Key': parseConfig.masterKey
}
}).then(function (httpResponse) {
logger.log(groupLogger, `destroyAvatarImagesFromGroup() | Successfully deleted file at ${profilePhotoLargeSizedImageURL}`)
}, function (httpResponse) {
logger.log(groupLogger, `destroyAvatarImagesFromGroup() | Failed to delete file at ${profilePhotoLargeSizedImageURL} | HTTP Response Status: ${httpResponse.status}`)
})
我知道该URL是正确的,因为当我在浏览器中访问该URL时,它将返回图像。
我正在使用Google Cloud Storage(parse-server-gcs-adapter)。
问题:如何删除存储为PFFiles的文件?
相关问题:如何覆盖PFFile?
非常感谢您的帮助。