It seems that the File import does not support (well) the local Uris

For example, if we try to use "public://folder" as destination

Comments

vasike created an issue. See original summary.

vasike’s picture

StatusFileSize
new809 bytes

here is patch for this

vasike’s picture

Status: Active » Needs review
drclaw’s picture

Status: Needs review » Closed (works as designed)

You actually can do this already. To indicate that the destination is a directory, and that the filename should be maintained, you just need to add a trailing slash to the destination value. e.g. public://folder/

I believe the documentation on the destination property in the FileImport class explains this, although it's possible I added it after this came through... 🤔