All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.qcloud.cos.model.ciModel.utils.CICheckUtils Maven / Gradle / Ivy

Go to download

A single bundled dependency that includes all service and dependent JARs with third-party libraries relocated to different namespaces.

There is a newer version: 5.6.228
Show newest version
package com.qcloud.cos.model.ciModel.utils;

import com.qcloud.cos.model.PutObjectRequest;
import com.qcloud.cos.model.ciModel.persistence.PicOperations;

public class CICheckUtils {

    /**
     * 校验是否为上传覆盖原图请求
     *
     * @param putObjectRequest 上传内容请求
     */
    public static boolean isCoverImageRequest(PutObjectRequest putObjectRequest) {
        PicOperations picOperations = putObjectRequest.getPicOperations();
        if (picOperations != null && picOperations.getRules() != null) {
            for (PicOperations.Rule rule : picOperations.getRules()) {
                return true;
            }
        }
        return false;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy