File Upload: *.CSV

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • King

    #1

    File Upload: *.CSV

    When I upload CSV files to my development computer from my development
    computer the content type is displayed as Output 1. However, if I
    upload from another computer on my network using the EXACT same file,
    I get Output 2. Can anyone tell me why that is? I just want to check
    to see if the file being uploaded is of type CSV. I want this to work
    from any computer on the network.


    ===========Code Snippet======== ===
    HttpPostedFile file = UploadBox.Poste dFile;
    Response.Write( file.ContentTyp e);
    =============== =============== ==


    ============Out put 1==============
    application/vnd.ms-excel
    =============== =============== ==


    ============Out put 2==============
    application/vnd.ms-excel
    =============== =============== ==


    Thank you,
    King

  • Ignacio Machin \( .NET/ C# MVP \)

    #2
    Re: File Upload: *.CSV

    Hi,

    "King" <kingkyser@gmai l.comwrote in message
    news:1184678133 .401776.286890@ o11g2000prd.goo glegroups.com.. .
    When I upload CSV files to my development computer from my development
    computer the content type is displayed as Output 1. However, if I
    upload from another computer on my network using the EXACT same file,
    I get Output 2. Can anyone tell me why that is? I just want to check
    to see if the file being uploaded is of type CSV. I want this to work
    from any computer on the network.
    >
    >
    ===========Code Snippet======== ===
    HttpPostedFile file = UploadBox.Poste dFile;
    Response.Write( file.ContentTyp e);
    =============== =============== ==
    >
    >
    ============Out put 1==============
    application/vnd.ms-excel
    =============== =============== ==
    >
    >
    ============Out put 2==============
    application/vnd.ms-excel
    =============== =============== ==
    They look the same to me, but even if they are different (one read like
    text/plaintext) it does not matter, the answer you get is dependand of
    either the configuration of IIS or the default program that is registered in
    the system to handle a file with that extension.


    Why are you so worried about it?


    Comment

    • Kalpesh

      #3
      Re: File Upload: *.CSV

      King,

      Both the output is same. Can you explain the problem again?

      Kalpesh

      On Jul 17, 9:15 am, King <kingky...@gmai l.comwrote:
      When I upload CSV files to my development computer from my development
      computer the content type is displayed as Output 1. However, if I
      upload from another computer on my network using the EXACT same file,
      I get Output 2. Can anyone tell me why that is? I just want to check
      to see if the file being uploaded is of type CSV. I want this to work
      from any computer on the network.
      >
      ===========Code Snippet======== ===
      HttpPostedFile file = UploadBox.Poste dFile;
      Response.Write( file.ContentTyp e);
      =============== =============== ==
      >
      ============Out put 1==============
      application/vnd.ms-excel
      =============== =============== ==
      >
      ============Out put 2==============
      application/vnd.ms-excel
      =============== =============== ==
      >
      Thank you,
      King

      Comment

      • Bram

        #4
        Re: File Upload: *.CSV

        Ehm, I'm not sure I see what's the problem. Both outputs look
        identical to me. Isn't that what's supposed to happen?

        Regards,
        Bram
        When I upload CSV files to my development computer from my development
        computer the content type is displayed as Output 1. However, if I
        upload from another computer on my network using the EXACT same file,
        I get Output 2. Can anyone tell me why that is? I just want to check
        to see if the file being uploaded is of type CSV. I want this to work
        from any computer on the network.
        >
        ===========Code Snippet======== ===
        HttpPostedFile file = UploadBox.Poste dFile;
        Response.Write( file.ContentTyp e);
        =============== =============== ==
        >
        ============Out put 1==============
        application/vnd.ms-excel
        =============== =============== ==
        >
        ============Out put 2==============
        application/vnd.ms-excel
        =============== =============== ==
        >
        Thank you,
        King

        Comment

        Working...