mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-14 20:40:17 -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
|
|
}
|