Updated on 2023-12-15 GMT+08:00

Processing Files

When a file is uploaded and updated to bucket dew-bucket-input, an event is generated to trigger the function. The function encrypts and decrypts the file and stores the processed one into bucket dew-bucket-output.

Uploading a File to Generate an Event

Log in to the OBS console, go to the object page of the dew-bucket-input bucket, and upload the image.jpg file, as shown in Figure 1.

Figure 1 Uploading a file

Triggering the Function

After the file is uploaded to bucket dew-bucket-input, OBS generates an event to trigger the file encryption/decryption function. The function encrypts/decrypts the file and stores the processed one into bucket dew-bucket-output. View the run logs of fss_examples_dew on the Logs tab page.

The Objects page of the bucket dew-bucket-output displays the processed file image.jpg.encrypt, as shown in Figure 2. In the Operation column, click Download to download the file.

Figure 2 Output file