This topic describes how to store remote attachments from PHPWind to OSS.
PHPWind8.7 is used for this topic.
- Log on to the PHPWind website with an administrator account.
- On the management page, choose .
- Click the FTP Settings tab and configure parameters.
Configuration item Description Enable FTP uploads Specifies whether to enable FTP uploads. Select Enable. Website attachment URL Specifies the public endpoint of the bucket. The format is http://BucketName.Endpoint. In this example, the bucket resides in the China (Hangzhou) region, and the bucket name is test-hz-jh-002. Therefore, the URL is http://test-hz-jh-002.oss-cn-hangzhou.aliyuncs.com. For more information about endpoints, see OSS domain names. FTP server Specifies the IP address that runs ossftp. We recommend that you set this parameter to 127.0.0.1. FTP server port number Specifies the port number of the FTP server. The default value is 2048. Remote upload directory Specifies the remote upload directory for attachments. We recommend that you set this parameter to a period (.) to create a directory for attachments in the root directory of the bucket. FTP account Specifies the FTP account in AccessKeyID/BucketName format. Note that the forward slash (/) is a delimiter and does not indicate an alternative. FTP password Specifies the FTP password AccessKey secret. FTP timeout (seconds) Specifies the FTP timeout period. Set the value to 10. If no result is returned within 10 seconds, the system returns a timeout response.
- Post a new article to verify whether the configuration is successful.
- Upload an image attachment to the article.
- Right-click the image and choose Open Link in New Tab from the shortcut menu.