title: Upload a text file as attachment using Bot framework not working in Skype channel
body: <p>I am unable to upload a text file as an attachment using the Bot framework (Bot.Builder v3.11.0), when trying in the Skype channel. It worked in the Bot framework emulator though. Following is the code which uploads a file and to returns the activity with the uploaded file URL in the attachment. It throws an exception when using the Skype channel. Alternatively is there any other way to achieve uploading/attaching a text file in the Skype channel which the user can then download from within the client?</p>
  
  <pre><code>public static async Task&lt;Activity&gt; GetTextAttachmentAsync(Activity message)
  {
      var reply = message.CreateReply("Here is a text attachment");
      var serviceUrl = reply.ServiceUrl;
      var conversationId = reply.Conversation.Id;
  
      byte[] fileData = null;
      using (var wc = new System.Net.WebClient())
          fileData = wc.DownloadData("https://textfiles.com/100/adventur.txt");
  
      using (var connector = new ConnectorClient(new Uri(serviceUrl)))
      {
          var attachments = new Attachments(connector);
          var token = await (connector.Credentials as MicrosoftAppCredentials).GetTokenAsync();
          connector.HttpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Bearer", token);
          var response = await attachments.Client.Conversations.UploadAttachmentAsync(
              conversationId,
              new AttachmentData
              {
                  Name = "transcript.html",
                  OriginalBase64 = fileData,
                  Type = "text/html"
              });
  
          reply.Attachments = new List&lt;Attachment&gt;
          {
              new Attachment
              {
                  Name = "transcript.html",
                  ContentType = "text/html",
                  ContentUrl = attachments.GetAttachmentUri(response.Id)
              }
          };
  
          return reply;
      }
  }
  </code></pre>
  
  <p>Exception thrown from the <code>UploadAttachmentAsync()</code> function above:</p>
  
  <pre><code>Microsoft.Rest.HttpOperationException: Not Found
     at Microsoft.Bot.Connector.ErrorHandling.&lt;HandleErrorAsync&gt;d__2`1.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Microsoft.Bot.Connector.ConversationsExtensions.&lt;UploadAttachmentAsync&gt;d__15.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Support.Services.Bot.Core.Utilities.AdaptiveCardsHelper.&lt;GetTextAttachmentAsync&gt;d__4.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Support.Services.Bot.Core.Dialogs.BotDialog.&lt;HandleMessageAsync&gt;d__3.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
     at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
     at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
     at Support.Services.Bot.Core.Dialogs.DialogBase`1.&lt;MessageReceivedAsync&gt;d__8.MoveNext()
  </code></pre>