Base solution for your next web application

Activities of "peabmw"

Hello

I have created a controller called AttachmentController that inherit from AbpController, I use it to download files from disk, and it works fine. Files are downloaded by clicking download-links on a page, these links have href set to my action ( /download?filename=myfile.xml).

The code of my download action looks like this:

[HttpGet]
public async Task<IActionResult> Download(string filename)
{
    if (filename == null)
        throw new UserFriendlyException(L("File_Name_Missing_Error"));

    var path = Path.Combine(_appFolders.AttachmentsFolder, filename);

    var memory = new MemoryStream();
    using (var stream = new FileStream(path, FileMode.Open))
    {
        await stream.CopyToAsync(memory);
    }

    memory.Position = 0;
    return File(memory, MimeTypes.GetMimeType(filename), filename);
}

My issue is that when I decorate my controller with [AbpMvcAuthorize] to prevent any anonymous access to files and to be able to filter which user can access which attachment the link does not work (AbpSession.UserId is NULL in AuthorizationHelper and it tries to redirect me to loginpage).

Is there any way i can force the authorization header to be passed in the GET? Or any other ideas that I can try out?

/Mårten

Hi

I would like the fileupload (visible in demo components in left menu) to look as nice as it does on https://www.primefaces.org/primeng/#/fileupload :

But in my Zero site the buttons does have some right margins with borders and bottom border is missing:

Any tip on how I can fix the styling? I have tried to set a custom class but I have not been able to override the styling for the component (would be great if the component looked better and worked with the theme in default setup).

Regards

Hello

I have an entity created with ASP.NET Zero Power Tools/RAD tool and I want to convert it into a Multi Lingual Entity, can this be done with the RAD tool?

If not and i do it manually, will I still be able to work with the RAD tool when adding additional (non language dependent) fields to my entity?

/Mårten

Showing 1 to 3 of 3 entries