我最近了解到可以为客户端生成预先签名的 upload URL,以将其上传到S3。
可以在PutS3Object处理器的设置中将此URL设置为“ Endpoint Override URL”的值(可能通过FlowFile属性和ExpLang引用),然后PutS3Object完全使用该URL,而无需考虑其他任何设置与该预签名URL提供的内容不同吗?
答案 0 :(得分:1)
不。我认为这行不通。 if(condition()){ /*Same as before, but it checks first*/
while(1){
process();
if(!condition()) break;
/*The loop breaks before bad things happen*/
things_you_want_to_happen_only_while_condition_is_true();
}
}
主要用于提供备用端点(与S3兼容),例如VPC(虚拟私有云)。
但是,您可以使用/*A pointer that goes over the string T from right to left.
It prints "Yes" when pointing at the character 'O' and "No" when not*/
char T[] = {'O', 'V', 'E', 'R', 'F', 'L', 'O', 'W', 0};
char *P = &T[strlen(T)-1]; /*We want the pointer to start at the last character of T*/
while(1){
if(*P=='O') printf("Yes\n");
else printf("No\n");
if(P==&T[0]) break; /*When it reaches the beginning of T, it stops*/
/*We only want the pointer to go further back if it is not in the beginning of T.
That's because we don't know what's before in the memory.*/
P--;
}
并使用预先签名的URL和适当的HTTP方法配置Endpoint Override URL
来代替PutS3Object
。
要记住的一件事: