Search in sources :

Example 1 with Zone

use of com.qiniu.common.Zone in project paascloud-master by paascloud.

the class QiniuOssConfiguration method uploadManager.

/**
 * Upload manager upload manager.
 *
 * @return the upload manager
 */
@Bean
public UploadManager uploadManager() {
    Zone zone = Zone.autoZone();
    // 创建上传对象
    UploadManager uploadManager = new UploadManager(new com.qiniu.storage.Configuration(zone));
    log.info("Create UploadManager OK.");
    return uploadManager;
}
Also used : Zone(com.qiniu.common.Zone) UploadManager(com.qiniu.storage.UploadManager) Bean(org.springframework.context.annotation.Bean)

Example 2 with Zone

use of com.qiniu.common.Zone in project paascloud-master by paascloud.

the class QiniuOssConfiguration method bucketManager.

/**
 * Bucket manager bucket manager.
 *
 * @return the bucket manager
 */
@Bean
public BucketManager bucketManager() {
    Zone zone = Zone.autoZone();
    // 创建上传对象
    BucketManager uploadManager = new BucketManager(auth(), new com.qiniu.storage.Configuration(zone));
    log.info("Create BucketManager OK.");
    return uploadManager;
}
Also used : Zone(com.qiniu.common.Zone) BucketManager(com.qiniu.storage.BucketManager) Bean(org.springframework.context.annotation.Bean)

Aggregations

Zone (com.qiniu.common.Zone)2 Bean (org.springframework.context.annotation.Bean)2 BucketManager (com.qiniu.storage.BucketManager)1 UploadManager (com.qiniu.storage.UploadManager)1