mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -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
|
|
}
|