Added missing variable.
Sets the attachmentObjectID now.
Fixed canUpload method.
Fixed cache builder.