next up previous contents index



30.3 Automatisierter Upload

Für das Hochladen einer Datei stehen Ihnen folgende Optionen zur Auswahl:

  1. Upload der geänderten Datei per WebDMS
  2. Upload über FTP/SMB-Ordner (/office/dbname)
  3. Upload über API-Schnittstelle

Gerade die letzte Variante ist sehr mächtig, Sie erfordert aber ein kleines Skript (als Beispiel hier mit unserer Hauptsprache Perl).

#!/usr/bin/perl
my $ fout = shift; # get here the filename
use strict;
use LWP::UserAgent; # we work with UserAgent (our batch web browser)
use HTTP::Request::Common qw(POST); # the post method must be imported
my $server = "http://192.168.0.220/perl/avclient/index.pl";
my $www = LWP::UserAgent->new; # new www session
my $res = $www->request(POST "$server",
  Content_Type => 'form-data', # multipart/form-data
  Content => [ # structure for our file
  MAX_FILE_SIZE => 134217728, # max. size (WebDMS won't accept more)
  upload => [ $fout, $fout ], # file to upload, file name to use
  go => 'go_action', # we need to call the go_action command
  action => 'upload', # inside of go_action we need to use upload
  uploaddef => 0, # scan def
  host => 'localhost', # connection information
  db => 'archivista',
  uid => 'Admin',
  pwd => 'archivista',
  frm_Laufnummer => 1,
])



Subsections
    • 30.3.0.1 Automatisierung unter Windows
    • 30.3.0.2 Lösung mit WinUpload oder WinCopy