►
From YouTube: XAF Modules API of the Week - File Attachments
A
Hello,
everyone
and
welcome
back
to
another
sophomore
unity
of
the
week.
This
time
were
reviewing
the
file
attachment
model.
This
would
be
a
quick
one.
It's
very
simple:
to
implement
and
right
away.
You
have
a
functionality
to
attach
documents,
PDF
pictures,
anything
you
want
to
your
business,
okay,
so
let's
browse
quickly
through
the
documentation
and
less
then
the
shearing
action.
So
the
heart
of
the
attachment
model
is
the
I
filed
data
interface.
That
one
has
the
methods
for
save
the
file
clear:
the
file
load,
the
file.
A
So
in
South
there
is
already
a
file
data
class
that
implements
that
interface,
but
you
can
always
implement
it
in
your
business
associate.
Actually,
we
have
a
video.
Well,
we
do
that
implementation
just
to
be
able
to.
Instead
of
saving
the
the
attachment
to
the
database
is
saving
to
Dropbox
and
we
have
implementation
for
Amazon,
s3,
onedrive,
blob
storage,
you
name
it.
We
can
save
it
to
disk
and
that's
one
of
the
example
that
the
documentation
of
the
Express
has.
A
If
you
see
here,
they
give
you
a
they
flow
or
have
to
get
that
working
bar
when
you're
gonna
cover
that
now.
This
is
more
for
a
beginner
level
and
if
you
want
just
watch
the
Dropbox
video,
you
have
the
source
code
there
and
everything,
so
you
can
actually
take
a
look
and
also
because
we
are
saving
one
at
a
time.
If
you
wanna
take
a
look
at
how
to
add
multiple
files
in
the
web
version.
Please
go
for
it.
Okay,
let's
come
back
to
it.
They
filed
our
interface.
A
What
I
was
telling
you
before
you
see
the
method
you
have
for
clear:
they
nodded
to
load
the
data
from
the
string
safely
out
of
the
string,
so
really
handy.
Really,
nice
release,
okay,
let's
close
this
out
unless
actually,
unless
you're
finished
the
quick
overview
of
the
documentation.
That
way,
we
just
come
back
to
code
and
never
look
back.
A
We
have
a
couple
more
things
to
see
it's
like
we
can
actually
filter
if
we
are
only
allowing
them
to
select
pictures.
We
can
actually
say
that
in
attribute
and
in
the
model,
we
can
say
only
PDF
and
things
like
that.
We
can
also
have
to
be
a
word
that
in
asp.net
the
the
fowl
file
upload
size
is
four
megabytes.
So
if
you
want
more
than
that,
you'll
add
this
on
your
web
company,
but
that's
pretty
much
it.
Okay,
let's
jump
to
code
first
things.
A
A
A
A
Let's
say
this
one
one
beer
and
I
save
it,
and
then
we
can
open
it.
He's
opening
the
second
back.
You
he'd
open
the
PDF
you
can.
Actually,
if
we
right-click,
we
can
clear
the
content,
we
can
open
it
and
so
and
so
pretty
nice
right,
just
one
property.
Okay,
let's
now
do
something
nice
and,
let's
add
a
collection.
Let's
add
a
new:
let's
stop
for
a
second
set
any
other
space.
I
didn't!
A
B
A
A
B
B
B
A
You
you
I
will
then
we
can
attach
as
many
facts
when
it's
so
pretty
nice
I
just
drag
and
drop
the
Clara
property
would
do
the
Clara
collection
good
to
go.
So,
let's
see
quickly.
We
have
also
this
type
attribute.
This
one
will
allow
us
to
do.
Uniting
is
one
of
the
most
nice
one
is
day
they
ability
to
to
decide
which
type
of
files
I
want
to
allow.
So
if
we
go
to
customer-
and
let's
say
we
go
to
the
file
data,
we
we
call
it
attachment.
We
will
do
attachment.
A
A
Now,
when
we
try
to
add
the
attachment,
it
will
be
image:
dot,
PNG,
nice.
So
that's
pretty
much
for
this
video,
pretty
simple,
pretty
easy
fast!
That's
what
we
love
about
South
until
next
one
stuff
out
now,
I
just
realized.
We
didn't
show
the
web
part.
So
this
would
be
just
a
quick
ad.
So,
let's
just
I,
add
the
file
attachment
asp.net
model
to
the
module
designer
in
the
web
module
and
let's
just
run
it.
So
you
see
it's
the
secretary
saying
nothing
changed
haven't
touched
code.
A
B
A
Sobbing
one,
and
if
you
see
I,
haven't
changed
anything
we
have
the
attachment.
The
only
difference
is
right
here
we
under
seen
the
filter,
because
we
did
that
only
for
Windows
but
same
thing.
Even
they
are
attachment
that
we
did
in
window.
Is
here
so
I'd
like
to
show
you
that
in
web
it
works
great.
So
now
for
real
stuff
out.