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

com.qcloud.Module.Vod Maven / Gradle / Ivy

Go to download

Tencent Cloud Open API SDK for Java Copyright (C) Tencent Cloud All Rights Reserved. 版权所有 (C)腾讯云 http://www.qcloud.com

There is a newer version: 2.0.7
Show newest version
package com.qcloud.Module;

import java.io.File;
import java.io.IOException;
import java.security.NoSuchAlgorithmException;
import java.util.TreeMap;

import com.qcloud.Utilities.SHA1;

public class Vod extends Base {
	public Vod(){
		serverHost = "vod.api.qcloud.com";
	}
	
	public String MultipartUploadVodFile(TreeMap params) throws NoSuchAlgorithmException, IOException {
		serverHost = "vod.qcloud.com";
		
		String actionName = "MultipartUploadVodFile";

        String fileName = params.get("file").toString();
        params.remove("file");
        File f= new File(fileName);  
        
        if (!params.containsKey("fileSize")){
        	params.put("fileSize", f.length());
        }
        if (!params.containsKey("fileSha")){
        	params.put("fileSha", SHA1.fileNameToSHA(fileName));
        }
        
        return call(actionName, params, fileName);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy