[英]Can we upload and download files from AWS EFS using java and spring boot through an API?
Wanted to know can we use java and spring boot to upload files through an API想知道能不能用java和spring引导通过API上传文件
I tried to get the details of integration of EFS with spring boot from AWS website but no luck我试图从 AWS 网站获取 EFS 与 spring 引导集成的详细信息,但没有成功
There is no direct way to upload/download files to AWS EFS from local system.没有直接的方法将文件从本地系统上传/下载到 AWS EFS。 You need to mount the EFS file system locally using amazon-efs-utils
package and then perform normal file operations using Java File IO
.您需要使用amazon-efs-utils
package 在本地挂载 EFS 文件系统,然后使用Java File IO
执行正常的文件操作。
More details regarding mounting EFS file system here有关在此处安装 EFS 文件系统的更多详细信息
You need to use either你需要使用
AWS Transfer family AWS 传输系列
https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/transfer/AWSTransferClient.html https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/transfer/AWSTransferClient.html
or AWS Data sync或AWS 数据同步
https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/datasync/AWSDataSyncClient.html https://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/com/amazonaws/services/datasync/AWSDataSyncClient.html
Currently spring cloud aws does not have support for efs, but has for s3 https://docs.awspring.io/spring-cloud-aws/docs/current/reference/html/index.html#downloading-files目前 spring 云 aws 不支持 efs,但支持 s3 https://docs.awspring.io/spring-cloud-aws/docs/current/reference/html/index.html#downloading-files
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.