Closed gabe565 closed 1 year ago
Hey @gabe565 , thanks for this PR, I had been working on a rewrite of this package extending the original File
field from nova which would give the exact same API as the original File/Image field, I expect to be done with it later this week.
So on this new version instead of sending only the path through that weird encrypted string from the FilepondController im sending more info such as Original Name, Size, Path, Mime etc... so no need to store a JSON on disk and later retrieve it back, I think is a cleaner solution
That will be good. I intended for this to be a fix until that sort of thing could happen anyways, so if you plan to have it done soon that would be awesome!
Any updates?
@milewski This package is very useful and I enjoy using it, but it would be even better if we could retain the original filenames somewhere. Is this still in the pipeline?
@gabe565 have you had any luck with this patch? doesn't seem to work for single or multiple files over here unfortunately :(
Hm that's strange. I've been using it since I created it on a site with multiple file uploads. My definition looks like this if it helps at all:
Filepond::make('Attachments')
->disk(config('filesystems.default'), 'attachments')
->keepOriginalFilename()
->multiple()
I'm not sure why it's not working for you 😕 Do any errors get triggered?
Ahh, very weird. I used the same implementation. For multiple files it shows a hash for the filename just like the main branch, but I think behind the scenes it used the original file name to save because on page load it says it can't find the files.
If I remove multiple()
I get this head scratcher of an error when I try to save the form:
Add
keepOriginalFilename
flag that retains the original filename between the upload request and when the resource is actually saved.Adds a meta json file which is associated with an upload to reconstruct the original path.
Relates to #10