cordcycle
01/29/2024, 6:37 PMGoogle Cloud Storage XML API using Java bindings. The objectName starts with /. e.g. /bill.pdf. So far I have tried the following ways but couldn't get it to work:
1.
Map<String, String> conf = new HashMap<>();
// other conf <K,V> entries
conf.put("bucket", "<bucket-name>");
conf.put("root", "/");
Operator op = Operator.of("s3", conf);
op.write("bill.pdf", content).get();
2.
Map<String, String> conf = new HashMap<>();
// other conf <K,V> entries
conf.put("bucket", "<bucket-name>");
Operator op = Operator.of("s3", conf);
op.write("/bill.pdf", content).get();
The URI generated is always https://storage.googleapis.com/<bucket-name>/bill.pdf. However, I want it to be https://storage.googleapis.com/<bucket-name>//bill.pdf. Any ideas how I can achieve this?Xuanwo
01/30/2024, 4:26 AM/.Xuanwo
01/30/2024, 4:27 AM/ in the path.cordcycle
01/30/2024, 12:05 PMXuanwo
01/30/2024, 12:07 PMXuanwo
01/30/2024, 12:08 PMXuanwo
01/30/2024, 12:16 PM