Constructor and Description |
---|
FileUploader(Client client,
byte[] bytes,
java.lang.String filename)
Creates a new uploader from binary data.
|
FileUploader(Client client,
java.io.File file)
Creates a new uploader from a file on disk
(not to be confused with a file resource from Uploadcare API).
|
Modifier and Type | Method and Description |
---|---|
FileUploader |
store(boolean store)
Store the file upon uploading.
|
File |
upload()
Synchronously uploads the file to Uploadcare.
|
public FileUploader(Client client, java.io.File file)
client
- Uploadcare clientfile
- File on diskpublic FileUploader(Client client, byte[] bytes, java.lang.String filename)
client
- Uploadcare clientbytes
- File contents as binary datafilename
- Original filenamepublic File upload() throws UploadFailureException
upload
in interface Uploader
UploadFailureException
public FileUploader store(boolean store)