0

I was trying to upload image to particular system through API call. It is returning 404 bad request for few PNG images As per observation those the original image extension was jpg but it renamed as .png So, wanted to know if there is a way we can get original metadata for file in c# from file bytes?

Sujit
  • 1
  • You can check the headers https://en.wikipedia.org/wiki/List_of_file_signatures – Stanislav Aug 03 '22 at 05:51
  • If it's limited to image files, you could probably open them as an image file and find out what type of image they are that way. – ProgrammingLlama Aug 03 '22 at 06:02
  • Please add error message and, put source code – onoffon Aug 03 '22 at 06:05
  • Could you please tell me what's the details error message and the what's the server need request format. – Brando Zhang Aug 03 '22 at 07:16
  • Could you please provide more details on your issue? – Prasad-MSFT Aug 03 '22 at 07:54
  • Hi @Prasad-MSFT we working on chat bot in teams where in HH flow we are trying to send file to agent. In this scenario we are getting error for particular image which is downloaded from team. while uploading the image to Agent system we are passing file bytes , it's MIMe type and name. As the file MIME type is not matching it is throwing and error – Sujit Aug 03 '22 at 08:24
  • Please refer [this](https://stackoverflow.com/questions/16770312/get-meta-data-of-a-file-using-c-sharp) thread that addresses the same issue. – Prasad-MSFT Aug 04 '22 at 12:56

0 Answers0