Upload Status
In order to maintain the integrity of incoming files, servedat stores file and meta data in two temporary files. Once the upload is completed, the data file is renamed and the meta file is removed. This process only applies to file uploads, not Object Handler uploads.
The temporary files are stored in the same folder as the destination, using the name of the destination followed by these suffixes:
-sv.tmp | The file data received so far. |
-sv.met | Meta data describing the transaction and the attributes of the file being uploaded. |
If these two files exist, it means that an upload is either actively taking place, or was interrupted.
Querying the Upload Status
A client may retrieve the upload status by attempting to download either the "-sv.met" or "-sv.tmp" files. Such an attempt will fail with the error Object Incomplete and a report describing who has been uploading it, how much data has been uploaded, and an estimate of time remaining if it is still active.
With movedat, you can query an upload status directly by using the "-D" option. For example:
movedat -D me@example.com:dirname/testin-sv.met example.com:dirname/testin-sv.met Failed: Remote Application: Object Incomplete Upload by user "me" was interrupted 29 seconds ago after 2.14 megabytes of 20.0 megabytes
Resuming the Upload
Incomplete uploads can be resumed by repeating the upload attempt. Depending on the client and options, the user may be prompted for confirmation. servedat requires, at a minimum, that an upload be resumed by the same user who initiated it and that the date stamp of the file be unchanged. These requirements may be made more stringent in future updates.
If the file contents have changed since the time of the original upload, then resuming may result in corruption of the uploaded data. Detection of this is not guaranteed. If the source file may have changed since the original upload, restart instead of resuming or delete the partial upload.
Restarting the Upload
An interrupted upload can also be restarted from the beginning, effectively deleting the partial upload and beginning again. Depending on the client options selected, this may occur automatically if the server is unable to resume. See the individual client documentation for details.
Deleting a Partial Upload
An interrupted upload can be deleted by using an ExpeDat client to delete either the "-sv.met" or "-sv.tmp" file. Deleting one will automatically delete the other, assuming the client has sufficient permissions to do so. A busy upload cannot be deleted while it is still active.
Original Files
If a file with the same name as the one being uploaded already exists, that original file will not be deleted until the upload completes successfully. This ensures that a "good" copy of the file always exists, unless a client explicitly deletes it. Non-Windows servers will continue to allow the original file to be downloaded. Active downloads of the original file will not be interrupted, even when the original is replaced by the new version.
Windows servers do not allow the original file to be accessed while an upload with the same file name is pending. Windows servers will not allow an upload to begin while a download of the same file name is pending.