Avatar

Community Advisor

@duypnguyen maybe you can give me a hint on the aio-lib-files:
I am able to init aio-lib-files and then with files.list() I can see the files and with files.read("xxx") I can read a file.
But the function files.write fails with the following error message:

 

@adobe/aio-lib-files:error {
  "sdk": "FilesLib",
  "sdkDetails": {
    "filePath": "mydir/test.txt",
    "contentType": "Buffer"
  },
  "code": "ERROR_BAD_CREDENTIALS",
  "message": "[FilesLib:ERROR_BAD_CREDENTIALS] cannot access `cloud storage provider`, make sure your credentials are valid"
  "stacktrace": "FilesLibError: [FilesLib:ERROR_BAD_CREDENTIALS] ...
}

 

any ideas what I need to change? seems strange to have read access but write doesn't work ... 
Update: I tested what happens if I change the "storageAccessKey" to have the wrong value. In this case I can't even access the existing file and I get the "ERROR_BAD_CREDENTIALS" already on the "files.list" function ... that means, my credentials seem to be all right and the issue is somewhere else...