Waiting for engine...
Skip to main content

Uploading multiple Files

In this scenario, the client application will upload a set of small files together with a file directory.

Since it is an internal upload scenario, the app has connected to the server and been provided a Session ID (SessionID_NNN).

Also, the ID of target folder in the server is already known (RootFolderID_NNN).

Uploading Multiple Files

Because the total size of the files (78 KB) is within the web server limits (less than 2GB),
the client app could potentially send a single upload request with all files.
However, due to the way the protocol is designed, such upload request is not possible.

That is because the protocol dictates that each upload request can target only one folder in the server
(which is identified by the ImmediateParentFolderID form field).
As a result, the upload operation has to be broken in the following three different requests:

Request 1

Form FieldsExample
Upload operationInternal upload
Upload actionUpload file
InternalUpload_AppletUID
or
InternalUpload_SessionID
SessionID_NNN
ImmediateParentFolderIDRootFolderID_NNN
RootFolderIDRootFolderID_NNN
DeletePartiallyUploadedFile0
File FieldsExample
nameFile1
filenamechangelog.txt
[content]
nameFile2
filenameConfig.xml
[content]
nameFile3
filenameConfig.xsd
[content]

As a result of a successful request, the server creates a new file system log operation entry (LogOpID_NNN) that will be associated with the upload operation and saves the uploaded files.
The ID (FileID_NNN) of the last uploaded file of the set (Config.xsd) is returned in the headers.

Response 1

X-FileSystemLogOpIDLogOpID_NNN
X-FileIDFileID_NNN
X-FolderIDRootFolderID_NNN

Upon successful completion of the first request, the client app needs now to guarantee that the folder “IRM Functional Spec Screen” exists in the server under the target folder.
For that, it sends a request with the “Create folder” action. Note that request now contains the ID of the file system log entry that was created by the first request.

Request 2

Form FieldsExample
Upload operationInternal upload
Upload actionCreate folder
InternalUpload_AppletUID
or
InternalUpload_SessionID
SessionID_NNN
ImmediateParentFolderIDRootFolderID_NNN
RootFolderIDRootFolderID_NNN
FileSystemLogOpIDLogOpID_NNN
FolderNameIRM Functional Spec Screen
DeletePartiallyUploadedFile0

As a result of a successful request, the server creates a new folder in the server, if it does not exist yet in the target folder.
In any case, it returns its ID (FolderID_NNN) in the response headers.

Response 2

X-FileSystemLogOpIDLogOpID_NNN
X-FolderIDFolderID_NNN

Upon successful completion of the request to create the folder, the client app can now upload the files of the “IRM Functional Spec Screen” folders.
We will assume this folder has two files, Admin 1.jpg and Admin2.jpg.
Note that now the root folder (original target folder) and immediate parent folder (“IRM Functional Spec Screen” folder) are no longer the same folder.

Request 3

Form FieldsExample
Upload operationInternal upload
Upload actionUpload file
InternalUpload_AppletUID
or
InternalUpload_SessionID
SessionID_NNN
ImmediateParentFolderIDFolderID_NNN
RootFolderIDRootFolderID_NNN
FileSystemLogOpIDLogOpID_NNN
DeletePartiallyUploadedFile0
File FieldsExample
nameFile1
filenameAdmin1.jpg
[content]
nameFile2
filenameAdmin2.jpg
[content]

Response 3

X-FileSystemLogOpIDLogOpID_NNN
X-FileIDFileID_NNN
X-FolderIDRootFolderID_NNN
On this Page