Open moonmeister opened 4 years ago
So, the biggest issue I'm running across is that this will require using multipart/form-data
content for form submissions instead of JSON. I can do this conversion, but it'll require changes to how the lambda functions and handles data. I'm trying to figure out if their is a way to only require the multipart/form-data
submission if there is a file and then doing JSON otherwise, maybe this is all too much work and logic and I should just do the conversion.
@robmarshall Thoughts?
FYI: My client said to just drop upload support, so no rush anymore, I think this could still be a beneficial discussion.
So, The existing API doesn't support multiple files, it can support single file uploads. I think in the long run using something like WPgraphql and the https://github.com/harness-software/wp-graphql-gravity-forms plugin will be able to allow easier single and multi file uploads, and might allow this component to support file uploads (and many other things)...
Hey, sorry for the delay. The last few months have been crazy.
I think the link you provided will be a better option in the future. WP Graphql has a stronger following and a better concept. I will try and keep this live as I use it for my own projects.
In terms of file upload - is it as simple as converting to a blob? I suppose it depends on the file size...
I'm trying to remember...it's been so long. Yeah you have to convert the file but also all the data that goes with the file so its data type is multipart/form-data
compatible. I think what I was asking is, do we convert every request or only change to using multipart/form-data
when there is a file upload happening.
Just realized I need this for my client. I'll be working on it but wanted to give you a heads up. If you have any input, suggestions, etc...would love to hear it. Thanks.