DBFILESUploadArg

Objective-C

@interface DBFILESUploadArg : DBFILESCommitInfo <DBSerializable, NSCopying>

Swift

class DBFILESUploadArg : DBFILESCommitInfo, DBSerializable, NSCopying

The UploadArg 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

  • 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)initWithPath:(nonnull NSString *)path
                                    mode:(nullable DBFILESWriteMode *)mode
                              autorename:(nullable NSNumber *)autorename
                          clientModified:(nullable NSDate *)clientModified
                                    mute:(nullable NSNumber *)mute
                          propertyGroups:
                              (nullable NSArray<DBFILEPROPERTIESPropertyGroup *> *)
                                  propertyGroups
                          strictConflict:(nullable NSNumber *)strictConflict
                             contentHash:(nullable NSString *)contentHash;

    Swift

    init(path: String, mode: DBFILESWriteMode?, autorename: NSNumber?, clientModified: Date?, mute: NSNumber?, propertyGroups: [DBFILEPROPERTIESPropertyGroup]?, strictConflict: NSNumber?, contentHash: String?)

    Parameters

    path

    Path in the user’s Dropbox to save the file.

    mode

    Selects what to do if the file already exists.

    autorename

    If there’s a conflict, as determined by mode, have the Dropbox server try to autorename the file to avoid conflict.

    clientModified

    The value to store as the clientModified timestamp. Dropbox automatically records the time at which the file was written to the Dropbox servers. It can also record an additional timestamp, provided by Dropbox desktop clients, mobile clients, and API apps of when the file was actually created or modified.

    mute

    Normally, users are made aware of any file modifications in their Dropbox account via notifications in the client software. If true, this tells the clients that this modification shouldn’t result in a user notification.

    propertyGroups

    List of custom properties to add to file.

    strictConflict

    Be more strict about how each WriteMode detects conflict. For example, always return a conflict error when mode = update in DBFILESWriteMode and the given “rev” doesn’t match the existing file’s “rev”, even if the existing file has been deleted. This also forces a conflict even when the target path refers to a file with identical contents.

    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)initWithPath:(nonnull NSString *)path;

    Swift

    init(path: String)

    Parameters

    path

    Path in the user’s Dropbox to save the file.

    Return Value

    An initialized instance.