using Aliyun.OSS;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web;

namespace XYY.Core.Standard.AliYun
{
    public interface IAliYunPostFileSerivce
    {

        string PostHttpFile(System.IO.Stream file, string name);

        



        string GetNowPathName(string key);

        /// <summary>
        /// 上传文件到阿里云
        /// </summary>
        /// <param name="endPoint"></param>
        /// <param name="keyId"></param>
        /// <param name="keySecret"></param>
        /// <param name="bucketName"></param>
        /// <param name="fileName"></param>
        /// <param name="fileUpdate"></param>
        /// <returns></returns>
        PutObjectResult PostFile(string endPoint, string keyId, string keySecret, string bucketName, string fileName, string fileUpdate);
        /// <summary>
        /// 获取已上传文件的CDN地址 
        /// </summary>
        /// <param name="fileName"></param>
        /// <returns></returns>
        string GetCDN(string fileName, string endPoint);
        /// <summary>
        /// 获取已上传文件的CDN地址 
        /// </summary>
        /// <param name="fileName"></param>
        /// <returns></returns>
        string GetPublicCDN(string fileName);

        /// <summary>
        /// 获取已上传文件的CDN地址 
        /// </summary>
        /// <param name="fileName"></param>
        /// <returns></returns>
        string GetCDN(string fileName);
        /// <summary>
        /// 上传文件到阿里云
        /// </summary>
        /// <param name="endPoint"></param>
        /// <param name="keyId"></param>
        /// <param name="keySecret"></param>
        /// <param name="bucketName"></param>
        /// <param name="fileName"></param>
        /// <param name="fileUpdate"></param>
        /// <returns></returns>
        string PostFile(string fileName, string fileToUpdate);

        /// <summary>
        /// 上传文件到阿里云
        /// </summary>
        /// <param name="endPoint"></param>
        /// <param name="keyId"></param>
        /// <param name="keySecret"></param>
        /// <param name="bucketName"></param>
        /// <param name="fileName"></param>
        /// <param name="fileUpdate"></param>
        /// <returns></returns>
        string PostMd5File(string fileToUpdate, string Key);

    }
}
