In version 0.4 there is LocalFiles field, which I think allows you to upload multiple files in a single database record. However in version 4.0 I haven't found a way to downloading multiple files in the album image gallery. I am trying to do so, and it turns out to download only one file.
I think such a function would be necessary.
What do you think?
My code:
var myStorage = new keystone.Storage({
adapter: keystone.Storage.Adapters.FS,
fs: {
path: keystone.expandPath('./public/uploads/gallery/img'), // required; path where the files should be stored
publicPath: '/public/uploads/gallery/img' // path where files will be served
}
});
var Gallery = new keystone.List('Gallery', {
autokey: { from: 'name', path: 'key', unique: true },
plural: 'Albums',
singular: 'Album',
});
Gallery.add({
name: { type: String, required: true },
publishedDate: { type: Types.Date, default: Date.now },
images: { type: Types.File, storage: myStorage },
});
+1
And there is also an issue with the render of the filename :
<FileChangeMessage href={href} target="_blank">
It render a span and then the filename is not clickable...
Has anyone got multiple local files working in 4.0.0beta? As far as I can see this is a regression from 0.4.x and 0.3.x?
Right, this was being discussed last year in #3228
Hi, are there any updates for multiple files uploads?
From what I can see the File type still allows only one file, but maybe I'm missing something.
At the moment I'm still using LocalFiles though is deprecated, but is the only way I found to do it.
We NEED to have MULTIPLE FILE UPLOAD!!! This is a BLOCKER for updating my website to 4.0; not having it is a REGRESSION.
Most helpful comment
3228 was closed. So I hope this other issue gets some love.
We NEED to have MULTIPLE FILE UPLOAD!!! This is a BLOCKER for updating my website to 4.0; not having it is a REGRESSION.