Nenhuma Descrição

UploadFileModel.h 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. //
  2. // UploadFileModel.h
  3. // FirstLink
  4. //
  5. // Created by unicode on 14-10-11.
  6. // Copyright (c) 2014年 FirstLink. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. @interface UploadFileModel : NSObject
  10. // type 只能取pic-商品图片,audio-音频文件
  11. + (void)uploadFile:(NSData*)data
  12. fileType:(NSString*)type
  13. contentType:(NSString*)contenttype
  14. parameters:(NSDictionary *)parameters
  15. success:(void (^)(MSGHeader *header, id responseObject))success
  16. progress:(void (^)(NSUInteger bytesWritten, NSInteger totalBytesWritten, NSInteger totalBytesExpectedToWrite))progress
  17. failure:(void (^)(MSGHeader *header, NSError *error))failure;
  18. + (void)uploadFileNotLogin:(NSData*)data
  19. fileType:(NSString*)type
  20. contentType:(NSString*)contenttype
  21. parameters:(NSDictionary *)parameters
  22. success:(void (^)(MSGHeader *header, id responseObject))success
  23. failure:(void (^)(MSGHeader *header, NSError *error))failure;
  24. /**
  25. * 日志文件上传
  26. *
  27. * @param type head:头像,pic:照片,audio:音频,log:日志
  28. * @param contenttype 普通文本.log, .txt : text/plain, JPEG图形 .jpeg, .jpg : image/jpeg
  29. */
  30. + (void)uploadLogFile:(NSData*)data
  31. fileType:(NSString*)type
  32. contentType:(NSString*)contenttype
  33. parameters:(NSDictionary *)parameters
  34. success:(void (^)(MSGHeader *header, id responseObject))success
  35. failure:(void (^)(MSGHeader *header, NSError *error))failure;
  36. + (void)uploadAddressBook:(NSString*)string
  37. mobile:(NSString*)mobile
  38. totalNum:(NSString*)totalNum
  39. currNum:(NSString*)currNum
  40. success:(void (^)(MSGHeader *header, id responseObject))success
  41. failure:(void (^)(MSGHeader *header, NSError *error))failure;
  42. @end