Adding a file via the 'files' field

I’m going to have a number of different types of images on my page. I have added ‘files’ field for each:

03%20PM

But when I click to edit it only shows me files/images which have already been uploaded. Is there a way to allow users to upload directly here?

15%20PM

1 Like

No, you can’t upload images via files fields, only via files sections. In files fields you can only select images that have been uploaded before.

You can find all details on the reference page.

This feels like a missed opportunity. Although I’ve been used to this behavior from the image field in v2 I intuitively tried to upload via the file field. It would be perfect for cases where there is only one image needed on the whole page.

For those occasions, a files section without a srlect field would be sufficient?

Good point. A min: 1 max: 1 files section sounds like a good substitute.

I have to agree, I think this is a missed opportunity. The requirement to use a file section over a file field just makes things kind of a pain to blueprint. A complex page would need you to go back and forth between fields and files sections throughout the entire blueprint. Also the files section can’t be inside of a structure field or added to a builder field.

What I’ve had to do is add a “Files” tab to the blueprint, then instruct my client that they first have to navigate there and upload files before going and using them in the blueprint. This feels like a very disjointed editing experience.

42%20PM

I’m not saying the current solution is ideal for every use case and please feel free to add an issue in the ideas repo. I just suggestion an option for a particular use case.

The problem I see here is basically the same as why sections can’t be filtered. You’d have to define where the image should be uploaded and what template they should use and what section to be added to, because a files field (in contrast to a files section) offers complex filtering options for files, not only from the same page but also from different pages.

The same is by the way true for pages, I’d also love to have a pages field with an add button to create new pages, which will bring up the same sort of complexity.

I’m pretty sure we will soon have a plugin with a custom field if the core doesn’t add it.

The annoyance for me comes from not being able to drop the file anywhere on the panel like you can with K2. If you have a files section in a tab and and a files field in another tab, its annoying to have to move to the other tab to upload and then move back. I guess you guys did that because you can multiple files sections in a blueprint and the panel needs know which one the dropped file will belong to.

I’m not a guy and I didn’t do it, but yes, you would have to somehow decide where to add that file to, same complexity as above with the files field.

1 Like

Oh heck, no offence meant, it’s a common thing to say here, but i understand.

I guess the full panel drag and drop could be enabled if there was only one files section declared in the blueprint.

No problem. I know it’s a common thing to say but still, I wanted to make the point that I don’t really feel included in “guys”.

Yes, theoretically, but then I wonder what the user experience would be like, if the user could upload by drag and drop in one page but not in the next without really knowing why (hey, count your files sections!)

Yeah, it’s tricky. I guess the answer is the ability to declare tabs in a column, which I don’t think is possible currently. that way you can, if you wish, set up a persistent sidebar outside of the tabs. That way you could put the fields that are relevant to multiple tabs in there. Personally, i have a content tab, and anseo tab for declaring social sharing images, like for Open Graph. It’s annoying to flit to the content tab to upload and the go back to the other tabs to pick the images.

+1 for able to upload directly for each field is a must have feature. It’s pretty common practice on current web design that each page have several image collection. Imagine how easier for user that able to upload single file or multiple file just drag & drop.

I just wanted to say that I also had a tought time trying to get field uploads to work. At first glance it seemed that Kirby 3 covered this and I was a bit disappointed to find that the paradigm is still ‘upload first, choose second’.

However, the max: 1 option seems to be a really good workaround so I’m glad I found this thread.

@foxacid Upload functionality for the files field is on the roadmap for Kirby 3.2.

3 Likes

has this been implemented? :~)

Yes, the files field has upload functionality: Files | Kirby CMS

2 Likes

…oh wait, I’m tired. Of course I know it’s possible, this wasn’t even what I was looking for but somehow reading this thread has convinced me otherwise. Thanks anyways for your answer. Time for bed! :zzz: