mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
12 lines
287 B
CoffeeScript
12 lines
287 B
CoffeeScript
define [
|
|
"base"
|
|
"ide/directives/SafePath"
|
|
], (App, SafePath) ->
|
|
|
|
App.directive "validFile", () ->
|
|
return {
|
|
require: 'ngModel'
|
|
link: (scope, element, attrs, ngModelCtrl) ->
|
|
ngModelCtrl.$validators.validFile = (filename) ->
|
|
return SafePath.isCleanFilename filename
|
|
}
|