Heroin and welcome back now in the earlier video of multipart applaud, where we had a demo by running
a script, all the script is good for Demo, but it might not be a long time viable solution because
there are a lot of changes behind the scenes.
And script might not work after six months or one year.
So what I decided was will record one more video this time will go with the idea this is three API Low-Level
Beshir like amount's and look into how exactly the Multipack upload works.
So generally one important thing to remember is that even if you do a three sepi by default, if the
file is huge, it will do a multipart uploading.
So that is the default thing that doubles as three S.P. does.
However, it does not really fit all the used cases.
So one use case that I can give you is that let's suppose that one file is coming from Servery and second
part of the fight.
You want to upload it from the server to so know both the file to upload from a different server and
in S3, you want to merge both of those files.
So that cannot be done with the as risk become an.
So for those kind of use cases, you need to go through a lower level amounts and idalis S3 API is the
right one that can allow us to do that.
Now if you look into the on, there are various available commands for this.
You have complete multipart upload.
In fact, if I do my debugged, you will see you have complete, you have a board, you have create
and if you go back down you have list also.
So all of these are the multiple upload commands that you can use to create a multipart upload.
And if you do it through this way, you will actually come to know how exactly things work behind the
scenes.
Great.
So for our demo purpose, what I have done is so for example, I have A and B full file.
Now this before file have taken it as a random file from our terraformed course.
So if I quickly open this, you would see that it is running and basically we will be using this file
for our demo.
Now, if you look into the properties, it is close to around thirty eight point seven and be quite
a good size for our sample multipart upload demo.
Now, along with that, I already have a bucket which is created now the Bucket Escape Labs hyphen multiplied
by Vanimo and this is where it will be doing all the practicals from.
So I'm in my command from and if I do it, unless you see I have a terraformed up and before fi.
So since this is little big fight, let's assume this is a big fight.
What we really need to do as a first step in multiple upload is to split a larger file into smaller
chunks of data.
And this can be done with various commands, including the building Linux split command.
So let me clear the screen and I'll do a little different.
ELLICH So the current size of this file is thirty nine.
And so what I want is I want this file to be split it into three parts.
So the best way to do it through the building Linux command is by running the split command.
So this split basically allows us to split the file.
Now the file size that will be giving is eighteen and B and the final image terraform and I'll see the
part hyphen.
So now if you do a less hyphen, L.H., again, you will see that it has divided this terraformed up
and before in two three phase one Esbati you have by Beeby and Pakse but it is 18 and B but A B is 18
and B and by A C is 2.8.
So these are the three parts of the fight.
So we will be uploading each one of these, but the other is three API based calls.
So what I have done is I have already documented the commands and I'll also be putting it just right
below the video so you can go ahead and you can download it after you complete watching the video.
So the first come on, after you do the split is the S3 API.
You have create multiple upload and you are defining the bucket and you are also defining the key.
So in my case, the key would be terraformed.
And before and let me copy this camera and LPC DWYER So once I press enter.
You would see that it basically has given me a upload it now this upload, it is very important do copy
this, upload and store it somewhere, because this is going to be quite important in the upcoming Carmin.
So I'll say upload it and I'll paste.
Upload it here.
Now, the next thing that you need to do is that you have to start uploading the parts now, we have
already divided the file into three parts, so we'll have to upload each one of these parts.
So the command to do that is a dabblers S3 API.
Instead of create multiple upload, you have a blow to back the bucket that remains the same.
The key also needs to be saved with this data form dot and before an additional thing is you have to
define the pipe number.
Now the part number is one.
So this is going to be the first black and white hyphen hyphen body you will have to give the part name
with despite a SO if you'll quickly see where this is the first part.
But E and then you have to give the upload now upload it remains the one that we figured it out from
the previous government.
So let me copy this up first.
I copied and pasted over here and the next thing that I need is I have to copy the uploaded and I paste
the upload.
So it is applauding the fight and after it has completed uploading the file, it will give you a e-TAG
as a output.
Now, just copy this.
It will be important as well.
So I'll save for part one.
The e-TAG is this one now.
I'll run the same command multiple times because the earlier command that we had to run it had by no
one and the body was.
Now we know that we had splitted data from the time before into two, three files.
So basically I have to run the same command three times.
So this time it would be part number two and the part name would be.
But hyphen Ibe.
So, again, it is uploading the file once it has uploaded.
It has given me the day I copied it and I save this year along with that will have to do this again
one more time because we have three.
But I do the same thing.
This time it would be by sea at the back, easy, perfect.
And again, this has given us the e-TAG.
And now we have the three deaths, which are really so if you quickly do a clear three.
Now, if I quickly show you if I try and refresh this, you will see that there are no files which are
available here.
The reason why there are no files is because you have uploaded three parts.
You have not concatenated them.
So you will have to merge them so that merging is remaining.
So.
And this is the reason why you are not seeing the fight over here.
So in order to do that, the next thing that you will have to do is you have to do the concatenation
part.
So before we do that, we can do to establish a three eBay list particle, which basically will show
me all the parts which are uploaded.
So if you quickly run this command by specifying the upload idea, also I copied upload it and if I
press enter.
All right, so we made a little mistake.
Your head should be there for them before and yeah, you will see that there are three of.
One is part one.
You have byte number two and you have byte number three.
So all of them are present.
All you have to do is you have to merge them back because these are multipack.
Do you have to merge all the three parts into one back and that one part will be visible in the S3 bucket.
So let me clear the screen again and let me create a file coalesce file charges on.
So within the file charges on.
Basically you have to specify all the decks and the associate by name.
So there is a specific format that you need to follow and I already have that format available.
But again, I'll be uploading this format and you can use it at your end.
Now of it in this format, you will see that there are byte numbers and each part number has an associated
e-TAG.
So this e-TAG comes from the e-TAG that we had stored earlier.
So let me copy the debt associated with that one and I'll post it away.
Your.
Great, I'll copy the e-TAG associated with part to.
And save it by three.
So once you have this directly copied and pasted within the file design and save it now, the last thing
that you have to do is you have to complete the multipart upload.
So you have already done uploading of individual parts.
So you have to complete the multipart upload.
So far that we have a an index of eatables as three Ebor.
This thing, it is complete the multipart upload.
Now we are specifying the multiple upload file as file Laugesen.
So this is the file Dodgson, which contains details related to part and it's associated that.
So this allows a three to know which is part one, which is part two, which is part three so that it
can do the concatenation.
Now once it comes to know that you have to basically specify the upload idea.
So you have multiple upload file finder Jason, you specify the bucket name and you specify the key,
which is data from the time before and you specify the upload.
So this is the only thing which is required.
So since our bucket name is Epilepsia one multipart hyphen demo, I'll use this.
Let me cover this up.
I'll clear the screen, I'll run this Gummow, and I'll put the.
Upload ideas of.
So once you have and you see that it is giving the output, saying that the key is there from the time
before, and it is also giving the exact location to that terror from the day before.
So now, if you will go to the extreme management console and if you press refresh, you will see that
you have data from that and before they present.
So in order to quickly verify everything is working as expected.
What I'll do is I'll download the file and will try running it just to make sure that everything is
working correctly.
So let me open this up and if you will see that it is working perfectly from the last to end.
So this means that I might upload has been completed successfully.
So this is the low level details into how multipart really works.
So whenever you do a WS a streak, it does all of these things behind the scenes.
However, this is something which gives you good information related to how things work in the lower
level.
So this is it about this?
We do.
I hope this has been informative for you, and I look forward to see you in the next video.