 
             return defer.promise
 
-
-        _uploadWorker: (file, filename) ->
+        _uploadWorker: ({ file, filename }) ->
             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'

            @_disabled = false
            @_createInput()


        _setDestFolder: (destFolder) =>
            @awscredentials.destFolder = destFolder


        _uploadS3: (file, filename) ->
            defer = $q.defer()
            awsS3 = @awscredentials


                params: Bucket: awsS3.bucket
            )

            filename = "#{ destFolder }/#{ filename }" if destFolder

            fileParams =
                Key: filename
