object_id => $self->object_id,
object_type => $self->object_type,
mime_type => 'application/pdf',
- file_type => 'documents',
+ file_type => 'document',
file_contents => 'this is no pdf');
my $file1 = SL::File->get(id => $id);
SL::File->rename(id => $id,to => $newname);
my $files1 = SL::File->get_all(object_id => $object_id,
object_type => $object_type,
- file_type => 'images', # may be optional
+ file_type => 'image', # may be optional
source => 'uploaded' # may be optional
);
=over 2
-=item - documents,
+=item - document,
which can be generated files (for sales), scanned files or uploaded files (for purchase) for an ERP-object.
They can exist in different versions. The versioning is handled implicit. All versions of a file may be
deleted by the user if she/he is allowed to do this.
-=item - attachments,
+=item - attachment,
which have additional information for an ERP-objects. They are uploadable. If a filename still exists
on a ERP-Object the new uploaded file is a new version of this or it must be renamed by user.
combinide/merged with the document-file in the time of printing.
Today only PDF-Attachmnets can be merged with the generated document-PDF.
-=item - images,
+=item - image,
they are like attachments, but they may be have thumbnails for displaying.
So the must have an image format like png,jpg. The versioning is like attachments
=item C<file_type>
-The type may be "documents", "attachments" or "images" for a new file.
+The type may be "document", "attachment" or "image" for a new file.
=item C<source>
=item C<file_type>
-The type may be "documents", "attachments" or "images". This parameter is optional.
+The type may be "document", "attachment" or "image". This parameter is optional.
=item C<file_name>
my ($object) = SL::File->get_all(object_id => $object_id,
object_type => $object_type,
- file_type => 'images', # may be optional
+ file_type => 'image', # may be optional
source => 'uploaded' # may be optional
);
# read attributes