js SDK only provides APIs such as uploading and image processing. It is found that java SDK provides various operations such as file deletion, batch modification, etc. Is it because JS SDK does not support these operations? If there is a JS SDK with corresponding API, please provide us with links
大家讲道理2017-06-23 09:15:19
It is recommended to submit the deletion operation on the server side. If js is submitted on the front end, ak sk will be exposed and bring security risks to the account.
阿神2017-06-23 09:15:19
Official SDK documentation:
Management resource interface
Note that these interface operations require "management credentials".
Management credentials are the mechanism used by Qiniu Cloud Storage to verify whether management requests are legal. It is recommended to be used on the business server side. For example, viewing resource meta-information, deleting or moving resources, etc. usually require a legal management credential. Management requests without credentials or with illegal credentials will return HTTP error code 401, indicating authentication failure. The function of managing credentials is similar to downloading credentials:
Ensure that the request initiator has administrative rights to the target space.
Ensure that the content of the management request received by the server has not been tampered with, including the URI representing the management action and the parameter information of the management action.
Link:
Manage Credentials
In fact, it means that requesting these operations requires "management credentials", that is, "accessToken".
"accessToken" needs to be obtained through "AccessKey" and "SecretKey". If the client gets "accessToken", "AccessKey" and "SecretKey" will be exposed. This will be unsafe, and others will directly get these two values to operate.