Ways to upload documents into and download from SeedDMS

Running a document management system has many advantages compared to a local file storage on your computer’s disc, but many of them don’t help if documents cannot be easily uploaded, downloaded, or generally accessed. The fact, that a web based DMS can be made available from all over the world, requires to cover many more scenarios when you need to add a document to the DMS or retrieve one from the DMS. The following sections will describe those scenarios. Some of them can be handled with features already build into SeedDMS others require an extension which isn’t freely available. It will not be an in depth description of each scenario but rather an overview.

Getting documents out of SeedDMS

There are countless scenarios in which you would like to retrieve a single document or a collection of documents from SeedDMS. A friend ask you to send him the image you have taken of him last weekend and saved to SeedDMS. A colleague needs all the documentation of a project stored in a single folder. Your boss asks you for all the invoices within the last year. Your insurance company needs a scan of your passport (already in SeedDMS), but for security reason you don’t want to send it by mail but provide a download link.

Keep in mind that none of the below methods for retrieving documents from SeedDMS are suitable for backups. They are missing all the meta data (or offer just a portion of it) and deliver just the bare files.

Regular download

The most obvious way in a web based application to get hold of a single document is by simply downloading it on the local disc. SeedDMS offers two ways:

  1. clicking on the preview image in the folder list or
  2. clicking on the button ‘Download’ on the document’s details page

Both ways result in a copy of the document in your local download folder, e.g. on your PC or mobile phone. It’s than up to you how to process that file.

This method requires a browser and an account in SeedDMS with sufficient access rights to read the document and to download documents at all.

Download a collection of files

If more than one document is to be downloaded, it becomes cumbersome to download them individually. The search page has an export button for downloading the search result as an excel spread sheet and also allows to download the latest content of all found documents. SeedDMS will create a zip file with one folder named by the current date. That folder contains an excel spread sheet metadata.xlsx and the latest content of each document. The file name of those documents will comprise the document id, version number and document name. If the document name does not have a file extension already, it will be appended.

Downloading a folder recursively

A similar function like the export on the search page is provided by the none free extension download_folder which puts all latest versions into a single zip file keeping the folder structure. Hence it will recursively iterate over all subfolders. Since this can result in very large files the zip file will be cached. For those files which are still too large to be created when first requested, a cache warm up task checks regularly if a zip file is already cached and if not it will create it.

Downloading the clipboard

Just like downloading the content of a folder, the current documents on the clipboard can be downloaded as a zip file. This is implemented by the none free extension download_clipboard. The content of the zip file is similar to what the search export delivers without the additional meta data file. Folders on the clipboard will also not be included.

Export to server’s file system

Exporting documents in a zip file as described above does not scale very well, though the caching implemented by the Folder download extension allows to create zip files with several thousand documents. A more efficient way of exporting large parts of the folder tree is implemented by the none free Export into filesystem extension. Instead of creating a zip file for download, it just copies the latest document versions into the server’s filesystem by keeping the folder structure. This is much faster than creating and downloading a zip file, but it requires access to the server to actually pack the files into an archive and possibly download it. If space is limited on the server the files can be symlinked instead of copied and afterwards tared by specifying the option -k for dereferencing the links.

Get documents via WebDAV

A not so obvious but built in method to download documents and folders from SeedDMS is WebDAV. Any SeedDMS installation offers WebDAV access at <httpRoot>webdav/index.php. Any WebDAV client will do it. Once connected all documents and folders you have access to will show up in your WebDAV client. Since many operating system integrate WebDAV support into their regular file managers, you can easily copy documents from SeedDMS onto your local disc or access them with other programs, e.g. your mail reader for attaching a document in SeedDMS to mail or sending it with your favorite messenger.

Get documents via REST API

A more technical approach uses the REST API to retrieve a document. The following shell script uses curl to login into SeedDMS first and than downloads the latest version of a document (of course you need to adjust the parameters

#!/bin/sh
URL=https://my-server.org
USER=admin
PWD=admin
DOCID=1111
OUTPUT=/tmp/myfile

curl --silent -F "user=${USER}" -F "pass=${PWD}" -b cookies.txt -c cookies.txt "${URL}/restapi/index.php/login" | jq '.'

curl --output ${OUTPUT} -s -b cookies.txt "${URL}/restapi/index.php/document/${DOCID}/content"

If you do not have jq installed, then remove the piping into jq. It’s just to beautify the output.

There are cases when you would like to have certain persons access to a document without giving them an account in SeedDMS, e.g. when your insurance company ask you to provide certain documents with sensitive information you wouldn’t like to send by unencrypted email. The Download Link extension creates a temporary link within SeedDMS for downloading a single document. This link can be given to anybody you would like to have access on the document. The link can have an expiration date and be associated with a specific document version or even a version in a specific status.

Send documents by email

If sending a document by email from within SeedDMS isn’t crucial, then the non free extension email document is the fastest way to convey a document to somebody. All it needs, is to enter an email address and optionally a comment which is added to the mail body.

Putting documents into SeedDMS

Archiving and working with documents first of all requires to get them somehow into SeedDMS. The classical method is by uploading the document on a web page and that’s what SeedDMS offers from the very beginning. But just like downloading documents, it sometimes is too cumbersome or time consuming for various reasons. This is when a number of extensions for SeedDMS deserves consideration.

Uploading a document from the drop folder

Drag & Drop of documents into SeedDMS is the fastens way to upload documents. But there are two disadvantages

  1. It can still take a long time for large documents. Possibly longer than the timeout of the PHP script
  2. There is no way to set any meta data for the document. That needs to be done afterwards.

This is where the drop folder in SeedDMS can be helpful. A drop folder is a regular directory on the server where files can be placed for upload into SeedDMS. Each user has its own drop folder. If the drop folder functionality is turned on, then another file selection field in the upload form for a document or a document version is added, which allows to select a file from the drop folder. Because the file is already on the server, it doesn’t have to be uploaded anymore and saving it into SeedDMS is almost done instantly.

If such a drop folder is accessible over the network, e.g. by ftp, ssh, etc. it could be filled with documents from a scanner or any other source producing files.

Uploading documents located on a web server

Often documents already exist on some public web server, e.g. a video or documentation files. Normally you would have to download it and afterwards upload it into SeedDMS. This can be combined in one step with the help of the none free extension web download. It adds another field to the upload form in SeedDMS which can be filled with an URL instead of selecting a local file. Adding the document will retrieve the document behind the URL and upload it into SeedDMS.

Adding an anonymous upload area

Persons without an account in SeedDMS have no way to upload documents. But sometimes this would come in handy, e.g. if students need to upload their assignments, but you don’t want to create an account for each of them and also setting appropriate access rights. This is what upload area is for. It creates an URL which, when opened in a browser, will show an upload form. The URL is also encoded in a QR code to be passed to the uploaders. The URL includes all the restrictions (in an encrypted form) for uploading a document, which are

  • a date until uploads are allowed (optional)
  • a maximum size for a single uploaded document (optional)
  • the folder where uploaded documents are stored
  • a user used as the owner of the uploaded document
  • the language of the upload form
  • a code which needs to be entered when uploading a document (optional)

Importing attachments from a mail box

Just like documents are placed on public servers, many documents are being send as an attachment by email. Scanner for example, often offer to send a scanned document by email. Storing them into SeedDMS will require to open the email client, save the attachment locally and afterwards uploading it into SeedDMS. It would be much easier if SeedDMS could fetch the attachments straight from the email in the mail box. That’s what the non free import mail extension does. It is able to read any IMAP mail box, retrieve the attachments and save them into SeedDMS. With just one click. There are various configuration settings to filter emails and distribute them over different folders. The import can be done automatically or manually.

Importing for the server’s file system

Just like exporting documents into the server’s file system, it is possible to do it the other way around. This is like uploading a file from the drop folder but it supports importing a complete folder structure with many folders, subfolders and documents. This is the perfect tool for initial upload of hundreds of documents. Especially, it is useful because the files itself can be accompanied by a csv file with meta data, which is also imported. You will find the tool in the admin area.

Adding documents via WebDAV

WebDAV supports both downloading and uploading documents. This is one of the most convenient methods to get files into SeedDMS. Just connect your file manager or WebDAV client with SeedDMS’ WebDAV interface and copy any folder structure right into SeedDMS. Compared to the import from the file system this method has a disadvantage. It cannot import any meta data, which of course is not a problem if extra meta data is not available anyway.