Skip to main content

Partially Uploaded Files

The SFTP protocol allows files to be partially uploaded. It lets a client append the rest of the data later.

Unfortunately, an SFTP server is unaware of whether an uploaded file is complete or partial. Only the client app knows if there is remaining data to be uploaded later. To make matters worse, there's no way for a server to know what "later" means for a client app. The remaining data might be sent a few minutes, hours, or days later or never at all.

Files.com provides a site setting, Preserve Partial SFTP Uploads After Disconnects, that gives you control over how our SFTP service handles incomplete uploads. If your counterparty can only use SFTP and you do not need uploads to resume, consider disabling the setting. With the setting disabled, Files.com automatically discards incomplete uploads when a client disconnects without explicitly closing the file.

Some SFTP client apps upload into a temporary file and then rename it to its target name. For example, when uploading file.csv a client will upload into a file named something like file.csv.filepart and then, after the complete file contents have been uploaded, rename file.csv.filepart back to file.csv.

SFTP client apps can resume the upload only if the partial file remains at its location. Moving, renaming, or processing a partial file removes the client app's ability to resume the upload.

To avoid partially uploaded files, use a Files.com native app to perform atomic uploads instead.

If resume support is required, partial files cannot be avoided entirely, but you can limit the trouble they cause. Do not configure Automations, encryption, or Folder Settings on destination folders of SFTP uploads, because they act on partial files. Set any Automation or script that processes uploaded files to skip temporary names like .filepart, so it acts only on files that have been renamed to their final name. Use schedules to delay actions on uploaded files. For example, if you expect files to be uploaded at 9 am, use an automation with a custom schedule set for 10 am to allow an extra hour for any remaining data to be uploaded.