SenseNet / sn-io

Import and export features and tools for the sensenet repository.
GNU General Public License v2.0
0 stars 0 forks source link

Incorrect creation of image-type files during import without a .content file #39

Closed VargaJoe closed 6 months ago

VargaJoe commented 1 year ago

When importing image-type files without a corresponding .content file, the import process always attempts to create them as File type content. In the sensenet repository, there is a configuration setting called UploadFileExtensions. Is it possible to make sure that this setting is also taken into account during the import process of sn-io?

There is a use case scenario where multiple issues arise due to previous field settings derived from exported content and rather we would delete these .content files.

Solution

Currently the Import action behaves differently from Upload. We should use the same type discovery as in UploadHandler. Consider the different use cases (what the client sends as type, which types are allowed in the container - only Image, or File and Image, etc.)

Code: ODataMiddleware.CreateNewContentAsync