I'm a professional Swift coder, Vapor Neophyte.
I'm trying to learn how to upload & download an arbitrary image.
I'm using Vapor v4.77 (Concurrency).
I need complete demo code to piece the parts into a cohesive whole to understand.
Reference, info is greatly appreciated.
Thanks!
For downloading an image you can use Vapor's stream API
You have a number of options for uploading, but the efficient way is to stream it to a file as that doesn't load the whole thing into memory. There's an example in Vapor:
1 Like
I have piecemeal code snippets, most are dated (pre-Vapor v4.7).
Most of the tutorials merely cover introductory text like ‘Hello World.’
I want to get an in-depth grasp of working with binaries (images) and forms between Vapor and the UI.
Thanks for the lead.
I’ll study it.
~ Ric.
1 Like