Base solution for your next web application
Open Closed

Power tool Datatype File chosen Error GetFileAllowedTypes. No method implemented in controller #12488


User avatar
0
stanley5389 created

No method Implemented What should create. MVC & Angular project

using CoreSync.MultiTenancy.Rms; using System; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using Abp.Domain.Entities.Auditing; using Abp.Domain.Entities; using Abp.Auditing;

namespace CoreSync.PropertyService;

[Table("Residences")] [Audited] public class Residence : Entity, IMayHaveTenant { public int? TenantId { get; set; }

[Required]
[StringLength(ResidenceConsts.MaxNameLength, MinimumLength = ResidenceConsts.MinNameLength)]
public virtual string Name { get; set; }

public virtual ResidenceType Type { get; set; }

public virtual ResidenceStatus Status { get; set; }

[Required]
[RegularExpression(ResidenceConsts.PhoneNumberRegex)]
[StringLength(ResidenceConsts.MaxPhoneNumberLength, MinimumLength = ResidenceConsts.MinPhoneNumberLength)]
public virtual string PhoneNumber { get; set; }

[Required]
[RegularExpression(ResidenceConsts.EmailAddressRegex)]
[StringLength(ResidenceConsts.MaxEmailAddressLength, MinimumLength = ResidenceConsts.MinEmailAddressLength)]
public virtual string EmailAddress { get; set; }

[StringLength(ResidenceConsts.MaxDescriptionLength, MinimumLength = ResidenceConsts.MinDescriptionLength)]
public virtual string Description { get; set; }

[Required]
[StringLength(ResidenceConsts.MaxAddressLength, MinimumLength = ResidenceConsts.MinAddressLength)]
public virtual string Address { get; set; }

[Required]
[StringLength(ResidenceConsts.MaxCityLength, MinimumLength = ResidenceConsts.MinCityLength)]
public virtual string City { get; set; }

[Required]
[StringLength(ResidenceConsts.MaxStateLength, MinimumLength = ResidenceConsts.MinStateLength)]
public virtual string State { get; set; }

public virtual Country Country { get; set; }

[Required]
[RegularExpression(ResidenceConsts.ZipCodeRegex)]
[StringLength(ResidenceConsts.MaxZipCodeLength, MinimumLength = ResidenceConsts.MinZipCodeLength)]
public virtual string ZipCode { get; set; }

public virtual decimal Price { get; set; }
//File

public virtual Guid? Files { get; set; } //File, (BinaryObjectId)

public virtual DateTime CreatedAt { get; set; }

public virtual DateTime UpdatedAt { get; set; }

}

Markdown is supported
Copy & paste or drag & drop images (max 30 MB per image)

2 Answer(s)
  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @stanley5389

    Thank you for your feedback. We have created an issue for this, you can follow the developments here.

    To resolve this issue, adding the method below to YourEntityNameController under the *.Web.Host project will resolve the issue you are experiencing.

    public string[] GetFileAllowedTypes()
    {
        return AllowedFileTypes;
    }
    
    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)
  • User Avatar
    0
    stanley5389 created

    Files not storing to DB aswell. What to do? Need to implement where else?

    Markdown is supported
    Copy & paste or drag & drop images (max 30 MB per image)