DBFILESUploadSessionStartArg

Objective-C

@interface DBFILESUploadSessionStartArg : NSObject <DBSerializable, NSCopying>

Swift

class DBFILESUploadSessionStartArg : NSObject, DBSerializable, NSCopying

The UploadSessionStartArg struct.

This class implements the DBSerializable protocol (serialize and deserialize instance methods), which is required for all Obj-C SDK API route objects.

Instance fields

  • If true, the current session will be closed, at which point you won’t be able to call uploadSessionAppend anymore with the current session.

    Declaration

    Objective-C

    @property (nonatomic, readonly) NSNumber *_Nonnull close;

    Swift

    var close: NSNumber { get }
  • Type of upload session you want to start. If not specified, default is sequential in DBFILESUploadSessionType.

    Declaration

    Objective-C

    @property (nonatomic, readonly, nullable) DBFILESUploadSessionType *sessionType;

    Swift

    var sessionType: DBFILESUploadSessionType? { get }
  • A hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash https://www.dropbox.com/developers/reference/content-hash page.

    Declaration

    Objective-C

    @property (nonatomic, copy, readonly, nullable) NSString *contentHash;

    Swift

    var contentHash: String? { get }

Constructors

  • Full constructor for the struct (exposes all instance variables).

    Declaration

    Objective-C

    - (nonnull instancetype)initWithClose:(nullable NSNumber *)close
                              sessionType:
                                  (nullable DBFILESUploadSessionType *)sessionType
                              contentHash:(nullable NSString *)contentHash;

    Swift

    init(close: NSNumber?, sessionType: DBFILESUploadSessionType?, contentHash: String?)

    Parameters

    close

    If true, the current session will be closed, at which point you won’t be able to call uploadSessionAppend anymore with the current session.

    sessionType

    Type of upload session you want to start. If not specified, default is sequential in DBFILESUploadSessionType.

    contentHash

    A hash of the file content uploaded in this call. If provided and the uploaded content does not match this hash, an error will be returned. For more information see our Content hash https://www.dropbox.com/developers/reference/content-hash page.

    Return Value

    An initialized instance.

  • Convenience constructor (exposes only non-nullable instance variables with no default value).

    Declaration

    Objective-C

    - (nonnull instancetype)initDefault;

    Swift

    init(default: ())

    Return Value

    An initialized instance.