Code Mode
This section shows an example on how to create a resizing style in Code mode on OBS Console.
Procedure
- On the homepage of the management console, choose .
- In the bucket list, click the target bucket to go to the Overview page.
- In the navigation tree on the left, select Objects.
- Click Upload Object. The Upload Object page is then displayed.
- Click the red-line-marked button to open the local file browser and select files, as shown in Figure 1.
- Select the image that you want to upload and click Open.
- Click Upload to upload the image. The uploaded image is displayed in the object list.
- Click the bucket name. Select Image Processing,
- Click Create Style to go to the style editing page.
- Input the style name style002. On the editing page, select Code.
- In the code input box, input the following command and parameters for resizing.
Specify a rectangle, whose w and h equal 100. Lock the aspect ratio, and obtain the smallest image in the extended area of the 100 x 100 rectangle.
image/resize,m_mfit,h_100,w_100
The style effect will be displayed on the right in real time. Figure 2 shows the final style effects.
- After finishing editing the image style, click OK to save the style. The new style style002 will be displayed in the style list,
- In the navigation tree on the left, select Objects. Click mountain.jpg in the object list to go to the file details page.
- By clicking the Preview Image tab, you can preview the effect of the current style, For details, see Figure 3.
- Click Copy Link. After prompted with Copied successfully, you can obtain the access address of the image file.
Last Article: Graphical User Interface (GUI) Mode
Next Article: Obtaining Image Information



Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.