You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.3 KiB

//
// MOBHttpPostedFile.h
// MOBFoundation
//
// Created by 冯 鸿杰 on 15/1/30.
// Copyright (c) 2015年 MOB. All rights reserved.
//
#import <Foundation/Foundation.h>
/**
* @brief HTTP上传文件
*/
@interface MOBFHttpPostedFile : NSObject
/**
* @brief
*/
@property (nonatomic, copy) NSString *fileName;
/**
* @brief
*/
@property (nonatomic, copy) NSString *contentType;
/**
* @brief
*/
@property (nonatomic, retain) NSData *fileData;
/**
* @brief
*/
@property (nonatomic, copy) NSString *transferEncoding;
/**
* @brief
*
* @param fileName
* @param data
* @param contentType
* @param transferEncoding
*
* @return
*/
+ (MOBFHttpPostedFile *)httpPostedFileByFileName:(NSString *)fileName
data:(NSData *)data
contentType:(NSString *)contentType
transferEncoding:(NSString *)transferEncoding;
/**
* @brief
*
* @param path
* @param contentType
*
* @return
*/
+ (MOBFHttpPostedFile *)httpPostedFileByPath:(NSString *)path
contentType:(NSString *)contentType;
@end