Provide chunked file upload mechanism - add sendEnd()
@@ -163,12 +163,14 @@ angular.module('client').factory('ManagedFileUpload', ['$rootScope', '$injector'
// Upload complete
managedFileUpload.progress = file.size;
+
+ // Close the stream
+ stream.sendEnd();
ManagedFileTransferState.setStreamState(managedFileUpload.transferState,
ManagedFileTransferState.StreamState.CLOSED);
// Notify of upload completion
$rootScope.$broadcast('guacUploadComplete', file.name);
-
},
// Notify if upload fails
@@ -186,11 +188,15 @@ angular.module('client').factory('ManagedFileUpload', ['$rootScope', '$injector'
ManagedFileTransferState.StreamState.ERROR,
Guacamole.Status.Code.INTERNAL_ERROR);
+ // Close the stream
+ stream.sendEnd();
+
}));
// Ignore all further acks
stream.onack = null;
+
};
return managedFileUpload;
