I have model
User and I want to develop uploading avatar to server or to S3 bucket(but I think it’s dangerous)
What is the best practice to upload files to server?
I have two ideas. First to send file to server with jquery ajax. Second to encode file to base64 set it to model of user who changes avatar and save this model, in this case Ember will send PATCH request to my API.