Put Object Meta Data
Using the following SDK method, you can add meta details for a particular object stored in a bucket in Stratus. The Object reference used in the below code snippet is the component instance.
The meta details will be passed as JSON key value pairs. For example, {“meta_key” : “meta_value”}
-
Using the following method to pass new meta details without adding the existent details will delete the existing details and only put the new details. To avoid this, pass the new meta details along with the existing meta details.
-
You can use alphanumeric, underscores, or whitespace characters, as well as hyphens, to write your metadata. No other special character is allowed other than the once mentioned.
-
You can fetch the metadata of an object using the HEAD request method. In the response, the metadata will be listed in the key ‘x-user-meta’.
-
The maximum size limit of characters allowed for the overall metadata is 2047 characters. The character count used to determine the size limit also includes the colon “:” special character used to define the key value pair.
copyconst objectMeta = { "key1": "value1" , "key2": "value2" }; const objMeta = await objectIns.putMeta(objectMeta); console.log(objMeta);
Example Response
copy{ "message": "Metadata added successfully" }
Last Updated 2025-05-30 16:54:59 +0530 +0530
Yes
No
Send your feedback to us