1

When I upload a file, I would like to have the etag so I can delete it afterwards. With the current API, the etag always returns null when uploading the file. Is there a way that I can get the etag without making 2 API calls: uploading the file -> get information about the file?

Even the documentation example returns null for the etag: http://developers.box.com/docs/#files-upload-a-file

Thanks.

4

1 回答 1

2

作为性能优化,Etag 计算与上传响应分开。在计算之前(通常在上传后的 100 毫秒内),我们将其保留为空。

如前所述,您可以在上传完成后不久在 /files/ 端点上调用 GET,并且 eTag 值将在那里。

我们确实计划将 eTag 计算与上传并行移动,并将其包含在对 POST /files/data 调用的响应中,但我们只会在性能是我们认为合理的情况下才会这样做。

于 2012-08-30T22:50:22.710 回答