►
Description
A brief walkthrough of the image upload feature iterations during the 13.2 milestone and what is carried over into the next milestone.
A
So,
firstly,
I
just
want
to
show
you
some
of
the
iterations
and
we
went
through
the
first
one
being
simply
adding
the
upload
file
tab
to
the
image
pop-up.
Previously
we
only
added
the
ability
to
add
an
image
by
specifying
URL.
This
iteration
adds
the
upload
file
tag,
which
contains
the
file
input
and
also
the
necessary
validation
that
goes
with
the
file
input
things
like
limiting
the
user
to
any
upload
image
files
and
also
preventing
the
user
from
adding
files.
That's
larger
than
two
megabytes
in
this
iteration.
A
In
the
next
iteration,
we
introduced
the
ability
to
upload
images
to
the
project.
Reaper
by
met
request,
so
this
this
met
request
handles
the
actual
uploading
of
the
images
to
the
project
Reaper
or
to
the
met
request,
and
it
also
prevents
duplicate
files
from
being
applied.
In
this
scenario,
a
user
selects
the
same
file
twice.
It
will
also
only
upload
images
that
are
present
in
the
Mactan
to
prevent
images
from
being
uploaded,
if
that's,
which,
which
is
actually
not
it
in
the
Mactan,
as
you
can
see,
only
uploaded
the
images
that
are
present.
A
These
two
images
are
plated
and
in
the
final
iteration,
which
is
currently
snowing,
there
will
introduce
the
ability
to
temporarily
preview.
The
selected
images
in
the
WYSIWYG
editor
will
use
will
will
enable
this
by
using
a
temporary
data
URL
the
front
end,
but
we
only
use
the
relative
URL
on
the
markdown
editor
to
ensure
that
the
correct
mode
Thomas
updated
in
the
merge
request
will
also
enable
the
feature
in
this
iteration
and
also
do
the
necessary
documentation
updates.
A
So,
jumping
into
into
the
code
for
this
feature,
if
we
have
a
look
at
the
image
model-
sorry
the
add
image
modal
component,
which
is
used
in
the
add
image
feature.
If
the
user
selects
okay
on
that
modal
and
they
are
on
the
upload
file
tab,
we
call
the
upload
file
method
and
in
this
method
we
expect
and
validate
the
file.
A
A
A
So
moving
on
from
here,
we
omit
the
upload
image
event
was
the
file
and
the
image
URL,
the
seven
kids
handle
in
the
edit
area
component
and
in
the
handler
we
update
the
image
repository.
The
image
repository
is
a
very
simple
service
that
simply
manages
the
images
for
us
on
the
front
end
before
we
submit
the
images
to
the
Met
request.
A
If
we
take
a
look
at
the
image
repository,
it's
quite
some
place.
It's
a
map
and
the
service
content
service
exposes
a
ad
and
get
all
method.
The
ad
takes
a
file
and
your
L
as
parameters
and
then
extracts
the
binary
from
the
file.
It
then
updates
the
image
map
and
uses
URL
as
the
key
and
the
binary
content
as
the
value
back
to
the
Edit
image.
A
Sorry,
edit
area
component,
when
the
user
decides
to
submit
the
content,
we
extract
the
images
from
the
image
repository
by
using
the
get
old
method
and
then
emit
a
submit
changes
event
with
the
images
in
the
payload.
That
event
then
eventually
gets
handled
in
the
submit
content
changes
service
which
can
be
found
in
the
submit
content
changes,
so
it
was
filed
over
here.
A
We
create
the
the
actions
by
ripping
through
all
of
the
images
and
then
ensuring
that
image
it
does
exist
in
a
Martin.
If
it
does
exist
in
a
Martin,
we
create
an
action.
The
image
will
get
uploaded.
As
page
64,
we
set
a
content
to
be
by
64
binary
and
we
use
the
file
path,
which
is
the
key
in
that
map.