Package com.cloudinary.android.payload
Class LocalUriPayload
java.lang.Object
com.cloudinary.android.payload.Payload<android.net.Uri>
com.cloudinary.android.payload.LocalUriPayload
public class LocalUriPayload extends Payload<android.net.Uri>
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String[]PROJECTION -
Constructor Summary
Constructors Constructor Description LocalUriPayload()LocalUriPayload(android.net.Uri data) -
Method Summary
Modifier and Type Method Description longgetLength(android.content.Context context)Get the length of the resource in bytesjava.lang.Objectprepare(android.content.Context context)Prepares the payload to upload to Cloudinaryjava.lang.StringtoUri()Constructs a uri of the data to upload, for serialization.
-
Field Details
-
PROJECTION
public static final java.lang.String[] PROJECTION
-
-
Constructor Details
-
LocalUriPayload
public LocalUriPayload(android.net.Uri data) -
LocalUriPayload
public LocalUriPayload()
-
-
Method Details
-
toUri
public java.lang.String toUri()Description copied from class:PayloadConstructs a uri of the data to upload, for serialization. -
getLength
public long getLength(android.content.Context context)Description copied from class:PayloadGet the length of the resource in bytes -
prepare
Description copied from class:PayloadPrepares the payload to upload to Cloudinary- Specified by:
preparein classPayload<android.net.Uri>- Parameters:
context- Android context- Returns:
- An object formatted for Cloudinary uploader. This can be one of InputStream, Byte array, File object or an absolute path (as string).
- Throws:
PayloadNotFoundException- If the request file or resource does not exist.
-