The way modern software defies distance has always fascinated me. I see beauty in connecting these peaces together.
In Blogster, when the user wants to add a picture to the post, quite a few things have to work perfectly together to make it possible:
- The browser grasps meta data about the file, including things like file type and file name
- The browser sends this information to the Blogster's backend server
- Blogster's backend connects to AWS S3 bucket to obtain a very special pre-signed link. This link is valid only for this particular file, can be used only one time, from a particular origin and during the next few minutes
- Using this link, the browser sends the picture directly to S3 bucket to avoid unnecessary work by our own server
- In response, S3 bucket gives to the browser a new filename and a key to retrieve this particular file
- This info gets back to Blogster server, which saves it in remote Mongo Database, together with the user's Google ID
All of this requires carefull configuration, a lot of packages and, frankly speaking, seems a bit like a magic to me.
The magic that I can be a part of!