MMFileUploadUtil.h 761 B

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // MMFileUploadUtil.h
  3. // RichTextEditDemo
  4. //
  5. // Created by aron on 2017/7/23.
  6. // Copyright © 2017年 aron. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import "UtilMacro.h"
  10. @protocol UploadItemCallBackProtocal <NSObject>
  11. - (void)mm_uploadProgress:(float)progress;
  12. - (void)mm_uploadFailed;
  13. - (void)mm_uploadDone:(NSString*)remoteImageUrlString;
  14. @end
  15. @protocol UploadItemProtocal <NSObject>
  16. - (NSData*)mm_uploadData;
  17. - (NSURL*)mm_uploadFileURL;
  18. @end
  19. @interface MMFileUploadUtil : NSObject
  20. AS_SINGLETON
  21. - (void)uploadFileWithData:(NSData*)uploadData;
  22. - (void)addUploadItem:(id<UploadItemProtocal, UploadItemCallBackProtocal>)uploadItem;
  23. - (void)removeUploadItem:(id<UploadItemProtocal, UploadItemCallBackProtocal>)uploadItem;
  24. @end