-
Notifications
You must be signed in to change notification settings - Fork 23
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
Uploading Images With aor-loopback #4
Comments
Well I managed to get this done. Do you want me to share documentation? |
Sure, please.. |
I finally had to completely bypass AOR loopback and use AOR fetchUtils to make the req and response.
Quite simple in the end. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello
Am using aor-loopback to connect with my API.
ON trying to create image upload capability I used the following aor guide to create a wrapper on aor-loopback
https://marmelab.com/admin-on-rest/RestClients.html#decorating-your-rest-client-example-of-file-upload
Here is my wrapper code.
I encountered some issues. After looking through the aor-loopback source code I found that
aor-loopback is JSON.stringifying the entire response body. Stringifying is removing the image from the FormData object.
Suggestions: It would be great if you could also export the fetchJson method from the package. Someone like me could then create a case in the wrapper above.
This should solve a number of other use cases including create etc.
Above is just a suggestion and you may choose any other idea to account for the image upload use case as well.
Thanks and regards
The text was updated successfully, but these errors were encountered: