Closed landlogicit closed 1 year ago
What's the file type of your image?
jpg
Hmm, that should be supported really. The allowed file types is really run by Umbraco as it's their property editor that is being reused so it should be using Umbraco's mechanisms for restricting file types, but I would have thought jpg should be fine
look
Have you configured the file uploads data types "Accepted file extensions"?
Yes. Error continue to show
What is the exact extension of your file (you have extensions turned off in your video so I can't tell) and what is the exact config of your file upload field.
My config on startup.cs:
public void ConfigureServices(IServiceCollection services)
{
services.AddUmbraco(_env, _config)
.AddBackOffice()
.AddWebsite()
.AddKonstrukt(cfg => {
cfg.AddSectionAfter("media", "Repositories", sectionConfig => sectionConfig
.Tree(treeConfig => treeConfig
.AddCollection<Persona>(x => x.Id, "Persona", "Persone", "A person entity", "icon-umb-users", "icon-umb-users",
collectionConfig => collectionConfig
.SetRepositoryType<PersonRepository>()
.SetNameProperty(p => p.Nome)
.ListView(listViewConfig => listViewConfig
.AddField(p => p.TitoloLavoro).SetHeading("Job Title")
.AddField(p => p.Email)
)
.Editor(editorConfig => editorConfig
.AddTab("General", tabConfig => tabConfig
.AddFieldset("General", fieldsetConfig => fieldsetConfig
.AddField(p => p.TitoloLavoro).MakeRequired()
.AddField(p => p.Eta)
.AddField(p => p.Email).SetValidationRegex("[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+")
.AddField(p => p.Telefono).SetDescription("inc area code")
)
.AddFieldset("Media", fieldsetConfig => fieldsetConfig
.AddField(p => p.Avatar).SetDataType("Upload File")
)
)
)
.AddSearchableProperty(x=>x.Nome)
.AddFilterableProperty(x=>x.Nome )
)
)
);
})
.AddComposers()
.AddPersone()
.Build();
}
This isn’t what I meant. You are pointing to the file upload data type, but I want to see the data types config in the settings section in the back office
look
So yea, that’s likely your problem. You are supposed to configure that, adding the file extensions you want to allow. Because your list is empty, it’s probably refusing everything.
If I upload an image to a page I don't get any errors. The image is saved No without putting any file extension as you have seen in the content pages I can upload photos.
Ok, I’ll have to take a closer look next week
ok. thank you.
Ok, I've managed to find the issue. I've uploaded a fix to our unstable nuget feed at https://nuget.outfield.digital/unstable/v3/index.json if you want to test the v1.6.4-beta0001 that is on there and confirm this fixes the issues for you, that would be great.
i test and show this error on save : Failed to save Person: Exception has been thrown by the target of an invocation.
Good Job. I tested your release version 1.6.4 and now i have no errors after uplad. All saved. Thanks you.
Describe the bug I have this error when i upload image file.
On Startup.cs i have this code :
.AddFieldset("Media", fieldsetConfig => fieldsetConfig .AddField(p => p.Avatar).SetDataType("Upload File") )
Steps To Reproduce Steps to reproduce the behavior:
Environment (please complete the following information):