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.

image upload sample

See original GitHub issue

Hello!

Following your example https://github.com/flowjs/ng-flow/blob/master/samples/image/index.html, I included <script type="text/javascript" src="/dist/ng-flow-standalone.js"></script> on my page.

I’m requiring flow and flowFactoryProvider just like the example shows:

angular.module('account.index', ['ngRoute', 'security.authorization', 'flow']);
angular.module('account.index').config(['$routeProvider', 'securityAuthorizationProvider', 'flowFactoryProvider', function($routeProvider, securityAuthorizationProvider, flowFactoryProvider){
  flowFactoryProvider.defaults = {
    target: 'upload/',
    permanentErrors: [404, 500, 501],
    maxChunkRetries: 1,
    chunkRetryInterval: 5000,
    simultaneousUploads: 4,
    singleFile: true
  };
  flowFactoryProvider.on('catchAll', function (event) {
    console.log('catchAll', arguments);
  });
  $routeProvider
    .when('/account', {
      templateUrl: 'account/account.tpl.html',
      controller: 'AccountCtrl',
      title: 'Account Area',
      resolve: {
        authenticatedUser: securityAuthorizationProvider.requireAuthenticatedUser
      }
    });
}]);

However I’m running into the following error, every time I reload my page:

Error: [$compile:ctreq] Controller 'flowInit', required by directive 'flowImg', can't be found!
http://errors.angularjs.org/1.3.15/$compile/ctreq?p0=flowInit&p1=flowImg
    at REGEX_STRING_REGEXP (http://localhost:3000/vendor/angular.js:63:12)
    at getControllers (http://localhost:3000/vendor/angular.js:7583:19)
    at nodeLinkFn (http://localhost:3000/vendor/angular.js:7772:33)
    at compositeLinkFn (http://localhost:3000/vendor/angular.js:7117:13)
    at nodeLinkFn (http://localhost:3000/vendor/angular.js:7763:24)
    at compositeLinkFn (http://localhost:3000/vendor/angular.js:7117:13)
    at compositeLinkFn (http://localhost:3000/vendor/angular.js:7120:13)
    at compositeLinkFn (http://localhost:3000/vendor/angular.js:7120:13)
    at compositeLinkFn (http://localhost:3000/vendor/angular.js:7120:13)
    at publicLinkFn (http://localhost:3000/vendor/angular.js:6996:30) <div ng-view="" class="container ng-scope">

Any idea what is missing?

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
SamarRizvicommented, Aug 20, 2016

@hellsan631 No, that is not the case. It is already added. The strange thing is, when I add flow-init in the root div of the modal view, it works. Can you explain why such strange behavior?

0reactions
hellsan631commented, Aug 21, 2016

It sounds like an issue with the scope of the flow-init, and that it doesn’t initialize it in the right order.

Read more comments on GitHub >

github_iconTop Results From Across the Web

File Upload Sample - West Wind Web Connection
This example uses a classic HTML server form submission to upload one or multiple selected image files to the server. It uses the...
Read more >
Upload Sample Image - ImageJ Wiki
Use the Help › Upload Sample Image command to upload a file (not just images) meant for the ImageJ developers. You might need...
Read more >
Optimized Upload Sample - Image Uploader 6.5 Dual - Aurigma
This demo application shows how to use Image Uploader to send resized images ... In this sample, the acceptable size is defined as...
Read more >
Photo & Image Upload Form Template - Typeform
Need to collect photos files from customers? Try this embeddable online photo upload form and make the process simple.
Read more >
Upload Sample Location Photos (Optional)
Select the desired sample location and click on the sample or well location icon, then scroll to the bottom of the screen. Here...
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