Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "TimMackey"

@ismcagdas - this problem has not been solved.

I would like to upload a BMP image (a stream of bytes) from memory - not a file on the user's system. Please refer to my initial post for details.

I figured this out. I'm posting this in case someone else wants to do something like this. I've seen other posts with similar questions.

Since the router will only load pages when the route changes (AppMenuItem.route property), the solution is to add another layer of component. The coding was pretty quick once I had a plan. The new AppMenu tree is:

    getMenu(): AppMenu {
        return new AppMenu('MainMenu', 'MainMenu', [
            new AppMenuItem('Dashboard', 'Pages.Administration.Host.Dashboard', 'flaticon-line-graph', '/app/admin/hostDashboard'),
            new AppMenuItem('Dashboard', 'Pages.Tenant.Dashboard', 'flaticon-line-graph', '/app/main/dashboard'),
            new AppMenuItem('TtmDashboard', 'Pages.User.Dashboard', 'far fa-edit', '', [
                new AppMenuItem('All', 'Pages.User.Dashboard', 'fal fa-globe', '/app/main/ttm-page_0', [], false, { menuId: 0, menuName: 'All'}),
                new AppMenuItem('Facilities', 'Pages.User.Dashboard', 'fal fa-school', '/app/main/ttm-page_1', [], false, { menuId: 1, menuName: 'Facilities'}),
                new AppMenuItem('Classrooms', 'Pages.User.Dashboard', 'far fa-users-class', '/app/main/ttm-page_2', [], false, { menuId: 2, menuName: 'Classrooms'}),
                new AppMenuItem('Academics', 'Pages.User.Dashboard', 'far fa-books', '/app/main/ttm-page_3', [], false, { menuId: 3, menuName: 'Academics'}),
                new AppMenuItem('Students', 'Pages.User.Dashboard', 'far fa-user-friends', '/app/main/ttm-page_4', [], false, { menuId: 4, menuName: 'Students'}),

I added a new component for each submenu item (route 'ttm-page_n', n = 0 - 4), with the export class name also numbered 0 to 4;

import { Component } from '@angular/core';

@Component({
    template: '<ttm-dashboard-comp></ttm-dashboard-comp>',
})
export class TtmPage0Component { }

...and added a selector to my dashboard component:

@Component({
    selector: 'ttm-dashboard-comp',
    templateUrl: 'ttm-dashboard.component.html',
    styleUrls:  ['ttm-dashboard.component.less',
                 'ttm-dashboard.component.css',
                ],
    encapsulation: ViewEncapsulation.None,
    animations: [appModuleAnimation()]
})
export class TtmDashboardComponent extends AppComponentBase implements OnInit, AfterViewInit {

Also, add entries in the router table:

{ path: 'ttm-page_0', component: TtmPage0Component, data: { permission: 'Pages.User.Dashboard' } },
{ path: 'ttm-page_1', component: TtmPage1Component, data: { permission: 'Pages.User.Dashboard' } },
{ path: 'ttm-page_2', component: TtmPage2Component, data: { permission: 'Pages.User.Dashboard' } },
{ path: 'ttm-page_3', component: TtmPage3Component, data: { permission: 'Pages.User.Dashboard' } },
{ path: 'ttm-page_4', component: TtmPage4Component, data: { permission: 'Pages.User.Dashboard' } },

...and @NgModule declarations:

    declarations: [
        TtmPage0Component,
        TtmPage1Component,
        TtmPage2Component,
        TtmPage3Component,
        TtmPage4Component,

When 'ngOnInit(); is called in TtmDashboardComponent the arguments are available for use:

    ngOnInit() {
        let menuId = parseInt(this._activatedRoute.snapshot.queryParams['menuId']);
        let menuName = this._activatedRoute.snapshot.queryParams['menuName'];

Yes, I got the code from GitHub repo. Sorry for the missing info. ANZ is using 'ng2-file-upload' to upload user profile picture. I use the same technique to upload pictures for my users. I would like to upload images in client memory (not local storage) to server service TempFileCacheManager.SetFile(string token, byte[] content). How can this be accomplished?

@commondesk - you might find this helpful: https://support.aspnetzero.com/QA/Questions/5527

This happens during development. The only way to obtain the screenshot above is with a Debug build. The tenancy name is NOT being used as a subdomain, although I would like to be able to do that in the future.

Importing the PasswordModule was the solution.

When impersonating a User after logging in as host admin, the Exception identified at the start of this post ("There is no user with id: 1") is thrown when _userManager.GetUserByIdAsync(currentUser.Value); is called.

Specific steps:

  1. login as host admin
  2. navigate to 'Tenants'
  3. Under 'Actions', select 'Login as this tenant'
  4. Select a non-admin tenant to impersonate. The impersonated User's id is 4, however currentUser.Value = 1, which is the host admin Id.

Hi @olmy90 I had a similar problem on a project last year. You might have to upgrade to a non-free account to resolve this. I suggest you contact an Azure rep.

@maliming - Your suggetion worked.

Showing 141 to 150 of 285 entries