-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flex Object with file field not working #37
Comments
RIght now file field needs special support from the object type (as in code) and is not supported without writing your own object class. This is mostly because of I've not had time to look into more general option yet. |
Is there an example I can follow to write my own object class for the file field? If you can point me in the right direction that would be great |
Both user and page class has example in it. They are quite specialized, but should give some idea how I'm doing it right now. |
Hi, I'm trying to follow some examples inside the user and page classes but I can't figure out where these classes are stored. Am I right to look inside the |
I'm also struggling to figure out what to implement in my own class to make file uploads work. Any help would be great. |
You need to create your own plugin and put the files under the folder structure in there. Don't put anything inside the flex-objects plugin folder it will get lost when you update it. We probably need to do a blog post or something that walks you through the process. |
@rhukster I've got that far, it's implementing the file upload within the class, ie which methods do I overload and how do I save/delete files as necessary. |
File field has been fixed as long as you use or extend |
I am having trouble getting a field of type file working within a flex object blueprint. In the administration panel I am presented with the option to select a file but when I save the file is not there as if it did not upload. The value for the file field in the markdown is also empty:
Here is my flex object blueprint
Grav version: 1.7.0-rc.1
Admin: 1.10.0-rc.1
Form Plugin: 4.0.0
I have tried with and without the destination defined for the header.img field.
I am hoping someone can help me identify whether this is a bug with the flex objects or if I am doing something wrong.
Thank you!
The text was updated successfully, but these errors were encountered: