How to upload a picuture from album? After I selected a picture from album,I got the path of the picture.But how to use it to upload to server?
I can't specify manually the value of element "<file>" due to it doesn't work even I specify a value to it.
I tried another way.Maybe I can upload stream directly.
function readFromStream(fileStream) {
try {
fileStream.position = parseInt(document.getElementById('position').value, 10);
var contents = fileStream.read(fileStream.bytesAvailable);
fileStream.close();
Output.append('File contents: <br/>');
Output.append('<div class="fileContents">' + contents + '</div>');
} catch (exc) {
Output.append('File reading exception: ' + exc.message + '<br/>');
}
}
I can get the fileStream,but how can i use it? Does this method can fix the problem?