Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. fileUpload control of asp

fileUpload control of asp

Scheduled Pinned Locked Moved ASP.NET
11 Posts 4 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R RajaAhmed

    i m using mozilla fire fox n looking for a full path of posted file from fileUpload control of asp string filepath= fileUpload1.PostedFile.FileName; but filepath only holds the file name.. no path............... helpp plzzzzzzzzzz

    C Offline
    C Offline
    Christian Graus
    wrote on last edited by
    #2

    Why would you need a file path ?

    Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

    R 1 Reply Last reply
    0
    • R RajaAhmed

      i m using mozilla fire fox n looking for a full path of posted file from fileUpload control of asp string filepath= fileUpload1.PostedFile.FileName; but filepath only holds the file name.. no path............... helpp plzzzzzzzzzz

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #3

      AhmedNisar82 wrote:

      fileUpload control of asp

      I guess you are talking about ASP.NET not ASP.

      AhmedNisar82 wrote:

      string filepath= fileUpload1.PostedFile.FileName;

      You will only get the file name. Use it to upload the file.

      FileUpload1.PostedFile.SaveAs(filpathToSave)

      Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

      C 1 Reply Last reply
      0
      • A Abhijit Jana

        AhmedNisar82 wrote:

        fileUpload control of asp

        I guess you are talking about ASP.NET not ASP.

        AhmedNisar82 wrote:

        string filepath= fileUpload1.PostedFile.FileName;

        You will only get the file name. Use it to upload the file.

        FileUpload1.PostedFile.SaveAs(filpathToSave)

        Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

        C Offline
        C Offline
        Christian Graus
        wrote on last edited by
        #4

        Yet another person who asks stupid questions, then does not reply when people try to help. I suspect he wants the full path because he wants to do some sort of file operation that won't work once he deploys to a server.

        Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

        A 1 Reply Last reply
        0
        • C Christian Graus

          Why would you need a file path ?

          Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

          R Offline
          R Offline
          RajaAhmed
          wrote on last edited by
          #5

          i want to assign a value oMediaManagerPro.SourceFile_Path =fuplVideo.PostedFile.FileName; oMediaManagerPro.Video_Bitrate = 300; oMediaManagerPro.Audio_Bitrate = 64; oMediaManagerPro.Audio_SamplingRate = 22050; MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_MP4(); but fuplVideo.PostedFile.FileName just give the name of the file not full path.....

          C 1 Reply Last reply
          0
          • R RajaAhmed

            i want to assign a value oMediaManagerPro.SourceFile_Path =fuplVideo.PostedFile.FileName; oMediaManagerPro.Video_Bitrate = 300; oMediaManagerPro.Audio_Bitrate = 64; oMediaManagerPro.Audio_SamplingRate = 22050; MediaInfo oMediaInfo = oMediaManagerPro.ConvertTo_MP4(); but fuplVideo.PostedFile.FileName just give the name of the file not full path.....

            C Offline
            C Offline
            Christian Graus
            wrote on last edited by
            #6

            What is oMediaManagerPro ? As I suspected, it looks like you have an object on the server and want to set it to use a path on the client, which obviously won't work. I suggest buying a basic ASP.NET book and reading it.

            Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

            1 Reply Last reply
            0
            • R RajaAhmed

              i m using mozilla fire fox n looking for a full path of posted file from fileUpload control of asp string filepath= fileUpload1.PostedFile.FileName; but filepath only holds the file name.. no path............... helpp plzzzzzzzzzz

              N Offline
              N Offline
              Nitin S
              wrote on last edited by
              #7
                      HttpPostedFile myfile = filMyFile.PostedFile;
                      int fileLen = myfile.ContentLength;
                      byte\[\] myData = new byte\[fileLen\];
                      myfile.InputStream.Read(myData, 0, fileLen);
                      String strFilename=Path.GetFileName(myfile.FileName);
              

              ============= NITIN SAWANT =============

              C 1 Reply Last reply
              0
              • N Nitin S
                        HttpPostedFile myfile = filMyFile.PostedFile;
                        int fileLen = myfile.ContentLength;
                        byte\[\] myData = new byte\[fileLen\];
                        myfile.InputStream.Read(myData, 0, fileLen);
                        String strFilename=Path.GetFileName(myfile.FileName);
                

                ============= NITIN SAWANT =============

                C Offline
                C Offline
                Christian Graus
                wrote on last edited by
                #8

                I have read this three times, and I still don't see how you think it answers the OPs question

                Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                1 Reply Last reply
                0
                • C Christian Graus

                  Yet another person who asks stupid questions, then does not reply when people try to help. I suspect he wants the full path because he wants to do some sort of file operation that won't work once he deploys to a server.

                  Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                  A Offline
                  A Offline
                  Abhijit Jana
                  wrote on last edited by
                  #9

                  Christian Graus wrote:

                  Yet another person who asks stupid questions, then does not reply when people try to help.

                  Boss, I did not understand what you mean by this. By the way, I didn't voted for this. [Edit]Now I have voted 5.[/Edit] Thanks

                  Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

                  modified on Wednesday, August 5, 2009 5:41 AM

                  C 1 Reply Last reply
                  0
                  • A Abhijit Jana

                    Christian Graus wrote:

                    Yet another person who asks stupid questions, then does not reply when people try to help.

                    Boss, I did not understand what you mean by this. By the way, I didn't voted for this. [Edit]Now I have voted 5.[/Edit] Thanks

                    Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

                    modified on Wednesday, August 5, 2009 5:41 AM

                    C Offline
                    C Offline
                    Christian Graus
                    wrote on last edited by
                    #10

                    I mean that his question is obviously asked because he assumes because he can write code on a dev machine that accesses the file by file path, it means that he can magically do the same thing on the server when he deploys. His post asking for more info pretty much proves that. And, so many people ask questions that basically show they know nothing about ASP.NET, then don't respond when people try to help ( this guy did eventually respond, but many do not ).

                    Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                    A 1 Reply Last reply
                    0
                    • C Christian Graus

                      I mean that his question is obviously asked because he assumes because he can write code on a dev machine that accesses the file by file path, it means that he can magically do the same thing on the server when he deploys. His post asking for more info pretty much proves that. And, so many people ask questions that basically show they know nothing about ASP.NET, then don't respond when people try to help ( this guy did eventually respond, but many do not ).

                      Christian Graus Driven to the arms of OSX by Vista. Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.

                      A Offline
                      A Offline
                      Abhijit Jana
                      wrote on last edited by
                      #11

                      Ya.. Got it Boss. You are absolutely correct!:thumbsup:

                      Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you. View My Latest Article

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups