mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-30 04:15:58 +08:00
Added attachment creation from link/name
This commit is contained in:
@ -606,6 +606,18 @@ module.exports = function (ngApp, events) {
|
||||
});
|
||||
};
|
||||
|
||||
$scope.attachLinkSubmit = function(fileName, fileLink) {
|
||||
$http.post('/files/link', {
|
||||
uploaded_to: pageId,
|
||||
name: fileName,
|
||||
link: fileLink
|
||||
}).then(resp => {
|
||||
$scope.files.unshift(resp.data);
|
||||
events.emit('success', 'Link attached');
|
||||
});
|
||||
$scope.fileName = $scope.fileLink = '';
|
||||
};
|
||||
|
||||
}]);
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user