de.deepamehta.plugins.files
Class UploadedFile
java.lang.Object
de.deepamehta.plugins.files.UploadedFile
public class UploadedFile
- extends Object
An uploaded file.
Files are uploaded via the REST API by POSTing multipart/form-data
to the /files
resource.
Client-side support: the public API of the deepamehta-files
plugin provides a method
dm4c.get_plugin("de.deepamehta.files").open_upload_dialog()
that allows the user to
choose and upload a file.
At server-side a plugin accesses the upload file via the
de.deepamehta.core.service.Plugin#executeCommandHook
. ### FIXDOC
- Author:
- Jörg Richter
Field Summary |
private org.apache.commons.fileupload.FileItem |
fileItem
|
Constructor Summary |
UploadedFile(org.apache.commons.fileupload.FileItem fileItem)
|
fileItem
private org.apache.commons.fileupload.FileItem fileItem
UploadedFile
public UploadedFile(org.apache.commons.fileupload.FileItem fileItem)
getName
public String getName()
- Returns the original (client-side) file name.
getSize
public long getSize()
getMediaType
public String getMediaType()
- Returns the content type passed by the browser or null if not defined.
toString
public String toString()
- Overrides:
toString
in class Object
write
void write(File file)
throws Exception
- Throws:
Exception
Copyright © 2014. All Rights Reserved.