de.deepamehta.plugins.files
Class UploadedFile

Show UML class diagram
java.lang.Object
  extended by 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)
           
 
Method Summary
 String getMediaType()
          Returns the content type passed by the browser or null if not defined.
 String getName()
          Returns the original (client-side) file name.
 long getSize()
           
 String toString()
           
(package private)  void write(File file)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fileItem

private org.apache.commons.fileupload.FileItem fileItem
Constructor Detail

UploadedFile

public UploadedFile(org.apache.commons.fileupload.FileItem fileItem)
Method Detail

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.