 import SyncServerShared
 
 extension FileController {
+    private func success(params:RequestProcessingParameters, upload:Upload) {
+        let response = UploadFileResponse()!
+        response.size = Int64(upload.fileSizeBytes!)
+
+        // 12/27/17; Send the dates back down to the client. https://github.com/crspybits/SharedImages/issues/44
+        response.creationDate = upload.creationDate
+        response.updateDate = upload.updateDate
+        
+        params.completion(response)
+    }
+    
     func uploadFile(params:RequestProcessingParameters) {
         guard let uploadRequest = params.request as? UploadFileRequest else {
             Log.error("Did not receive UploadFileRequest")

                case .found(let model):
                    Log.info("File was already present: Not uploading again.")
                    let upload = model as! Upload
                    let response = UploadFileResponse()!
                    response.size = Int64(upload.fileSizeBytes!)
                    params.completion(response)
                    return
                    
                case .noObjectFound:

            
            let options = CloudStorageFileNameOptions(cloudFolderName: uploadRequest.cloudFolderName!, mimeType: uploadRequest.mimeType)
            
            cloudStorage.uploadFile(cloudFileName:cloudFileName, data: uploadRequest.data, options:options) {[unowned self] result in
                switch result {
                case .success(let fileSize):
                    upload.fileSizeBytes = Int64(fileSize)
                    upload.state = .uploaded
                    upload.uploadId = uploadId
                    if params.repos.upload.update(upload: upload) {
                        self.success(params: params, upload: upload)
                    }
                    else {
                        // TODO: *0* Need to remove the file from the cloud server.
