                 originalFilename: _originalFilename
                 setDestFolder: (destFolder) -> _ctrl.destFolder = destFolder
                 setFileName: (filename) -> _ctrl.filename = filename
+                setUploadUrl: (uploadUrl) -> _ctrl.uploadUrl = uploadUrl
+                setUploadMethod: (uploadMethod) -> _ctrl.uploadMethod = uploadMethod
 
             _doUpload = =>
                 @_upload(
                     file: file
                     filename: _ctrl.filename
                     destFolder: _ctrl.destFolder
+                    uploadUrl: _ctrl.uploadUrl or @uploadUrl
+                    uploadMethod: _ctrl.uploadMethod or @uploadMethod
                 )
 
             if @onBeforeUpload


            data =
                file: file
                url: @uploadUrl
                method: @uploadMethod
                name: filename
            worker.postMessage data



            return defer.promise

        _uploadWorker: ({ file, filename, uploadUrl, uploadMethod }) ->
            defer = $q.defer()
            script = document.querySelectorAll('[src*="cg-file-upload.js"]')[0]
            workerUrl = new URL script.src.replace 'file-upload.js', 'file-upload-worker.js'
