question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: Unknown provider: $uploadProvider <- $upload at Error (<anonymous>)

See original GitHub issue

I’m trying to inject this module into a controller but when the controller is initialised I get the following error:

Error: Unknown provider: $uploadProvider <- $upload at Error (<anonymous>)

I’ve included the module (after angular.js).

<script src="/app/components/angularjs-file-upload/angular-file-upload.js"></script>

And injected it into my app:

angular.module('App',  ['ngResource', 'ngSanitize', 'ui.state', 'ui.compat', 'ngCookies', 'ui.bootstrap', 'angularFileUpload'])

And then in my controller:

angular.module('App').controller('FeaturedImageCtrl', ['$scope', '$rootScope', '$state', '$stateParams', 'dialog', '$upload', 'img_src', 'entity_id', 'entity', 'media', function ($scope, $rootScope, $state, $stateParams, dialog, $upload, img_src, entity_id, entity, media) {

However it seems to be the controller which throws the error.

Have I forgotten to do something?

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:13 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
mattharrisoncommented, Aug 19, 2015

I had the same problem. Was calling:

MyCtrl.$inject = ['ngFileUpload'];

Needed to call

MyCtrl.$inject = ['Upload'];
2reactions
danialfaridcommented, Oct 29, 2015

@oliveheide it is `Upload’ not ‘$upload’.

Read more comments on GitHub >

github_iconTop Results From Across the Web

angularjs angular-file-upload Unknown provider
I have included all the required files in view: · My module and controller: · Error: [$injector:unpr] Unknown provider: $uploadProvider.
Read more >
Resolve errors uploading data to or downloading data ... - AWS
I want to download data from Amazon Aurora and upload it to Amazon S3. How can I resolve an error I received while...
Read more >
B Troubleshooting Oracle Identity Federation
Oracle Access Manager Operation Error Access to the URL <targetURL> has been denied for user ... Unable to Modify File Used to Upload...
Read more >
Layer2 Cloud Connector User Documentation
The Layer2 Cloud Connector provides an easy and powerful way to synchronize or replicate content from many different data sources.
Read more >
gerrit - Git at Google
-46,30 +46,20 @@ message body, and reports warnings or errors to the git client ... @Inject Upload( - Provider<ReviewDb> dbProvider, Provider<CurrentUser> ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found