Closed iAmMrinal0 closed 3 years ago
This is a minimal snippet that I'm trying to use to upload an object and set its metadata:
void $ do lgr <- Google.newLogger Google.Debug stdout googleEnv <- Google.newEnv <&> (Google.envLogger .~ lgr) . (envScopes .~ storageReadWriteScope) runResourceT $ runGoogle googleEnv $ upload (objectsInsert bkt $ object' & objMetadata._Just.omAddtional.at "foo" ?~ "bar" & objName ?~ "test.json") "true"
In the response, the value is Nothing for metadata and just to be sure I verified on the object on GCS and it did not have them set too. Have I missed something in the code or should I do use objects patch to update it somehow?
Nothing
Used the lenses incorrectly. The correct usage was:
& objMetadata ?~ objectMetadata (HM.singleton "foo" "bar")
This is a minimal snippet that I'm trying to use to upload an object and set its metadata:
In the response, the value is
Nothing
for metadata and just to be sure I verified on the object on GCS and it did not have them set too. Have I missed something in the code or should I do use objects patch to update it somehow?