Skip to content

[TS]: Create Bot Cards Basic Sample #1884

Open
YugalPradhan31 wants to merge 9 commits intomainfrom
v-ypradhan/bot-file-upload-nodejs
Open

[TS]: Create Bot Cards Basic Sample #1884
YugalPradhan31 wants to merge 9 commits intomainfrom
v-ypradhan/bot-file-upload-nodejs

Conversation

@YugalPradhan31
Copy link
Contributor

No description provided.

@YugalPradhan31 YugalPradhan31 changed the title Bot file upload sample in Node.js [TS]: Updating the Bot file upload sample with Teams SDK Jan 28, 2026
@YugalPradhan31 YugalPradhan31 changed the title [TS]: Updating the Bot file upload sample with Teams SDK [TS]: Create Bot File Upload Basic Sample Jan 28, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request creates a new TypeScript bot file upload sample using the modern Teams SDK (@microsoft/teams.apps), replacing the old JavaScript implementation that used Bot Framework v4.

Changes:

  • Removes the old Bot Framework v4-based JavaScript implementation
  • Adds a new TypeScript sample using @microsoft/teams.apps SDK
  • Updates sample metadata and documentation

Reviewed changes

Copilot reviewed 35 out of 46 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
samples/bot-file-upload/nodejs/bot-file-upload/index.ts New TypeScript implementation with Teams SDK handlers for file upload/download
samples/bot-file-upload/nodejs/bot-file-upload/package.json New package configuration for TypeScript sample
samples/bot-file-upload/nodejs/bot-file-upload/README.md Documentation for the new TypeScript sample
samples/bot-file-upload/nodejs/bot-file-upload/assets/sample.json Updated sample metadata
samples/bot-file-upload/nodejs/bot-file-upload/.env Environment configuration template
samples/bot-file-upload/nodejs/* (deleted files) Removed old Bot Framework v4 implementation and configuration
Comments suppressed due to low confidence (1)

samples/bot-file-upload/nodejs/bot-file-upload/assets/sample.json:12

  • The creationDateTime and updateDateTime are set to future dates (2026-01-28). According to the internal knowledge, the current date is January 29, 2026, but setting the creationDateTime to 2026-01-28 for a new sample is problematic. The creationDateTime should reflect when the sample was originally created or use a realistic past date.

@YugalPradhan31 YugalPradhan31 changed the title [TS]: Create Bot File Upload Basic Sample [TS]: Create Bot Cards Basic Sample Feb 9, 2026
return stats.size;
} catch (error: any) {
console.error('Error retrieving file size:', error.message);
throw new Error('Failed to retrieve file size');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove extra throw

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed.

@YugalPradhan31
Copy link
Contributor Author

I have tested this sample on Microsoft Teams and Agents Playground, and it is working as expected. The "file upload" feature does not work in Agents Playground due to platform limitations. Please find the attached screenshot as proof of successful testing.

Agents Playground:
Screenshot (213)
Screenshot (214)
Screenshot (215)
Screenshot (217)
Screenshot (218)

File Upload Functionality in Teams:
Screenshot (210)
Screenshot (212)

}

// Downloads content from a URL and saves it to the specified file path
async function WriteFile(contentUrl: string, config: any, filePath: string): Promise<void> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

methods in typescript should be camelcase

@@ -0,0 +1,22 @@
# Environment variables
.env
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove, only .gitignore in root

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants