![](https://keeplearning.dev/images/featured/design-patterns-creational-33b1d7fa5ac3.png)
PHP
Here are my notes on uploading a file to Digital Ocean space with PHP.
If you are familiar with AWS S3, we can say it is a mirror thing in another Cloud provider. You can upload files, images, etc to a Digital Ocean space.
So there are many ways to use Digital Ocean Space, I just wrote a basic part uploading in base 64 format.
In my first letters, I said it is a mirror of S3. So we can use AWS SDK for uploading files to Digital Ocean Space.
Firstly install via composer;
composer require aws/aws-sdk-php
PHP Side
This is an example of uploading base 64 encodings, so on the client side, I am sending a string of image in base 64 formats to the backend.
A minor example for React side about how to convert to base64 string