IAliYunPostFileSerivce.cs 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. using Aliyun.OSS;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Web;
  8. namespace XYY.Core.Standard.AliYun
  9. {
  10. public interface IAliYunPostFileSerivce
  11. {
  12. string PostHttpFile(System.IO.Stream file, string name);
  13. string GetNowPathName(string key);
  14. /// <summary>
  15. /// 上传文件到阿里云
  16. /// </summary>
  17. /// <param name="endPoint"></param>
  18. /// <param name="keyId"></param>
  19. /// <param name="keySecret"></param>
  20. /// <param name="bucketName"></param>
  21. /// <param name="fileName"></param>
  22. /// <param name="fileUpdate"></param>
  23. /// <returns></returns>
  24. PutObjectResult PostFile(string endPoint, string keyId, string keySecret, string bucketName, string fileName, string fileUpdate);
  25. /// <summary>
  26. /// 获取已上传文件的CDN地址
  27. /// </summary>
  28. /// <param name="fileName"></param>
  29. /// <returns></returns>
  30. string GetCDN(string fileName, string endPoint);
  31. /// <summary>
  32. /// 获取已上传文件的CDN地址
  33. /// </summary>
  34. /// <param name="fileName"></param>
  35. /// <returns></returns>
  36. string GetPublicCDN(string fileName);
  37. /// <summary>
  38. /// 获取已上传文件的CDN地址
  39. /// </summary>
  40. /// <param name="fileName"></param>
  41. /// <returns></returns>
  42. string GetCDN(string fileName);
  43. /// <summary>
  44. /// 上传文件到阿里云
  45. /// </summary>
  46. /// <param name="endPoint"></param>
  47. /// <param name="keyId"></param>
  48. /// <param name="keySecret"></param>
  49. /// <param name="bucketName"></param>
  50. /// <param name="fileName"></param>
  51. /// <param name="fileUpdate"></param>
  52. /// <returns></returns>
  53. string PostFile(string fileName, string fileToUpdate);
  54. /// <summary>
  55. /// 上传文件到阿里云
  56. /// </summary>
  57. /// <param name="endPoint"></param>
  58. /// <param name="keyId"></param>
  59. /// <param name="keySecret"></param>
  60. /// <param name="bucketName"></param>
  61. /// <param name="fileName"></param>
  62. /// <param name="fileUpdate"></param>
  63. /// <returns></returns>
  64. string PostMd5File(string fileToUpdate, string Key);
  65. }
  66. }