F
Filament16mo ago
Zetto

FileUpload with TextInput disabled.

I'm using flysystem google drive adapter however it does not seems to work without custom fileupload, it only managed to store the filename in the db but cant show it because different logic. Before fixing that, i expect a more simple solution. On edit mode, when i add FileUpload fields together with TextInput of filename, it's all empty. But when i only add TextInput it shows the current filename correctly. I want it so that TextInput is disabled and shows current filename in db while the FileUpload field still works on storing the filename to the db (and the disabled TextInput field change accordingly).
6 Replies
Unknown User
Unknown User16mo ago
Message Not Public
Sign In & Join Server To View
Dan Harrin
Dan Harrin16mo ago
is google drive compatible with s3
Zetto
Zetto16mo ago
No but it uses the same flysystem v3, the adapter is listed on phpleague. On further inspection the error is CORS issue (on upload, but could be fixed with cors extension) together with different method on BaseFileUpload (gdrive does not use url() and exist() directly) so it must be custom on that. It still works however just on storing data, not viewing it My original question about the fields, so should i just make regular field that takes value from db? I don't find a way for it to make textinput with fileupload works since textinput will be empty if placed together with fileupload field
Dan Harrin
Dan Harrin16mo ago
filepond uses the real filename so the only way to display the stored one is a textinput or helperText() on the field
Zetto
Zetto16mo ago
Yeah i figure out to just use different column name and copy the data there then its viewable on textinput field.
Zetto
Zetto16mo ago
https://github.com/masbug/flysystem-google-drive-ext , need to customize BaseFileUpload for it to work here, and use CORS extension on browser (should be no problem after files set to public on gdrive)
GitHub
GitHub - masbug/flysystem-google-drive-ext: Flysystem adapter for G...
Flysystem adapter for Google Drive with seamless virtual<=>display path translation - GitHub - masbug/flysystem-google-drive-ext: Flysystem adapter for Google Drive with seamless virt...