Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在将视频从一个区域移动到另一个区域(s3fs),所以我这样做:
File newFile = new File(newFilePath);
然后使用此代码复制
FileUtils.copyFile2(file, newFile);
但是在 S3 中,我的对象内容类型是错误的。在此过程中如何将内容类型设置为“video/mp4”?甚至以前?
谢谢您的帮助。
s3fs 应该根据/etc/mime.types. 您的文件名是否与这些行匹配?否则应该可以在设置-o ahbe_conf和提供格式文件时强制 Content-Type:
/etc/mime.types
-o ahbe_conf
.mp4 Content-Type video/mp4