DBFILESThumbnailV2Arg
Objective-C
@interface DBFILESThumbnailV2Arg : NSObject <DBSerializable, NSCopying>
Swift
class DBFILESThumbnailV2Arg : NSObject, DBSerializable, NSCopying
The ThumbnailV2Arg
struct.
This class implements the DBSerializable
protocol (serialize and
deserialize instance methods), which is required for all Obj-C SDK API route
objects.
-
Information specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
Declaration
Objective-C
@property (nonatomic, readonly) DBFILESPathOrLink *_Nonnull resource;
Swift
var resource: DBFILESPathOrLink { get }
-
The format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts.
Declaration
Objective-C
@property (nonatomic, readonly) DBFILESThumbnailFormat *_Nonnull format;
Swift
var format: DBFILESThumbnailFormat { get }
-
The size for the thumbnail image.
Declaration
Objective-C
@property (nonatomic, readonly) DBFILESThumbnailSize *_Nonnull size;
Swift
var size: DBFILESThumbnailSize { get }
-
How to resize and crop the image to achieve the desired size.
Declaration
Objective-C
@property (nonatomic, readonly) DBFILESThumbnailMode *_Nonnull mode;
Swift
var mode: DBFILESThumbnailMode { get }
-
Full constructor for the struct (exposes all instance variables).
Declaration
Objective-C
- (nonnull instancetype)initWithResource:(nonnull DBFILESPathOrLink *)resource format: (nullable DBFILESThumbnailFormat *)format size:(nullable DBFILESThumbnailSize *)size mode:(nullable DBFILESThumbnailMode *)mode;
Swift
init(resource: DBFILESPathOrLink, format: DBFILESThumbnailFormat?, size: DBFILESThumbnailSize?, mode: DBFILESThumbnailMode?)
Parameters
resource
Information specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
format
The format for the thumbnail image, jpeg (default) or png. For images that are photos, jpeg should be preferred, while png is better for screenshots and digital arts.
size
The size for the thumbnail image.
mode
How to resize and crop the image to achieve the desired size.
Return Value
An initialized instance.
-
Convenience constructor (exposes only non-nullable instance variables with no default value).
Declaration
Objective-C
- (nonnull instancetype)initWithResource:(nonnull DBFILESPathOrLink *)resource;
Swift
init(resource: DBFILESPathOrLink)
Parameters
resource
Information specifying which file to preview. This could be a path to a file, a shared link pointing to a file, or a shared link pointing to a folder, with a relative path.
Return Value
An initialized instance.