💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
# C.83 S3PutTask Uploads an object to Amazon S3. This task requires the PEAR package [Services\_Amazon\_S3](http://pear.php.net/package/Services_Amazon_S3) Table C.113:聽Attributes NameTypeDescriptionDefaultRequired`key``String`Amazon S3 keyn/aYes (or defined before task call as: amazon.key)`secret``String`Amazon S3 secretn/aYes (or defined before task call as: amazon.secret)`bucket``String`Bucket to store the object inn/aYes (or defined before task call as: amazon.bucket)`content``String`Content to store in the objectn/aYes (or source or fileset)`source``String`Where to read content for the object fromn/aYes (or content or fileset)`object``String`Object namen/aYes (unless fileset)`contentType``String`Content type of the object, set to `auto` if you want to autodetect the content type based on the source file extensionbinary/octet-streamNo`fileNameOnly``Boolean`Whether filenames should contain paths when uploaded to a bucketfalseNo C.83.1 Example Uploading a file ``` <s3put source="/path/to/file.txt" object="file.txt" bucket="mybucket" key="AmazonKey" secret="AmazonSecret" /> ``` You can also define "bucket, key, secret" outside of the task call: ``` <property name="amazon.key" value="my_key" /> <property name="amazon.secret" value="my_secret" /> <property name="amazon.bucket" value="mybucket" /> <s3put source="/path/to/file.txt" object="file.txt" /> ``` You can also specify inline content instead of a file to upload: ``` <property name="amazon.key" value="my_key" /> <property name="amazon.secret" value="my_secret" /> <property name="amazon.bucket" value="mybucket" /> <s3put content="Some content here" object="file.txt" /> ``` It also works with filesets: ``` <property name="amazon.key" value="my_key" /> <property name="amazon.secret" value="my_secret" /> <property name="amazon.bucket" value="mybucket" /> <s3put> <fileset dir="${project.basedir}"> <include name="**/*.jpg" /> </fileset> </s3put> ``` C.83.2 Supported Nested Tags - `fileset`