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. General Programming
  3. C#
  4. Uploading a file

Uploading a file

Scheduled Pinned Locked Moved C#
helpquestiondatabasesysadmin
10 Posts 3 Posters 0 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.
  • S Offline
    S Offline
    Sean89
    wrote on last edited by
    #1

    Hi everyone! I have a webpage that allows a user to upload a file for storage in a database. However, I am having a problem when users try to upload a bigger file (usually 3MB+). I am assuming that this is because I am trying to send the entire file to the server at once :confused: How can I get around this? Any help is greatly appreciated ;P

    J G 2 Replies Last reply
    0
    • S Sean89

      Hi everyone! I have a webpage that allows a user to upload a file for storage in a database. However, I am having a problem when users try to upload a bigger file (usually 3MB+). I am assuming that this is because I am trying to send the entire file to the server at once :confused: How can I get around this? Any help is greatly appreciated ;P

      J Offline
      J Offline
      jeweladdict
      wrote on last edited by
      #2

      could it be that since the file is so large/connection is so slow, the operation times out? as to get around it, you could have the file rar'ed (like a zip) which will zip it up into pieces and then send the pieces bit by bit. Also, try compressing the file so that it gets smaller. If not, use FTP connection instead of form based.

      S 1 Reply Last reply
      0
      • J jeweladdict

        could it be that since the file is so large/connection is so slow, the operation times out? as to get around it, you could have the file rar'ed (like a zip) which will zip it up into pieces and then send the pieces bit by bit. Also, try compressing the file so that it gets smaller. If not, use FTP connection instead of form based.

        S Offline
        S Offline
        Sean89
        wrote on last edited by
        #3

        jeweladdict wrote:

        could it be that since the file is so large/connection is so slow, the operation times out?

        I am assuming so. Adding a rar or zip to the file might help but it is not something that i really want to do. Is there a way that you know of that I can send the file to the server in pieces? Thanks ;P

        J 1 Reply Last reply
        0
        • S Sean89

          jeweladdict wrote:

          could it be that since the file is so large/connection is so slow, the operation times out?

          I am assuming so. Adding a rar or zip to the file might help but it is not something that i really want to do. Is there a way that you know of that I can send the file to the server in pieces? Thanks ;P

          J Offline
          J Offline
          jeweladdict
          wrote on last edited by
          #4

          ftping would be the best bet.

          S 1 Reply Last reply
          0
          • J jeweladdict

            ftping would be the best bet.

            S Offline
            S Offline
            Sean89
            wrote on last edited by
            #5

            Ok thanks i'll give that a try ;) I also have a another question... Is it better to save the file to a database on the server or right on the disk?

            G 1 Reply Last reply
            0
            • S Sean89

              Ok thanks i'll give that a try ;) I also have a another question... Is it better to save the file to a database on the server or right on the disk?

              G Offline
              G Offline
              Guffa
              wrote on last edited by
              #6

              That depends on how you are going to use the file. --- b { font-weight: normal; }

              1 Reply Last reply
              0
              • S Sean89

                Hi everyone! I have a webpage that allows a user to upload a file for storage in a database. However, I am having a problem when users try to upload a bigger file (usually 3MB+). I am assuming that this is because I am trying to send the entire file to the server at once :confused: How can I get around this? Any help is greatly appreciated ;P

                G Offline
                G Offline
                Guffa
                wrote on last edited by
                #7

                There's a limit on the size of a request, I believe it's 4 MiB by default. Could it be that? Then you can change the limit in web.config. --- b { font-weight: normal; }

                S 1 Reply Last reply
                0
                • G Guffa

                  There's a limit on the size of a request, I believe it's 4 MiB by default. Could it be that? Then you can change the limit in web.config. --- b { font-weight: normal; }

                  S Offline
                  S Offline
                  Sean89
                  wrote on last edited by
                  #8

                  Thats news to me ;) How would I make those changes? Thanks

                  G 1 Reply Last reply
                  0
                  • S Sean89

                    Thats news to me ;) How would I make those changes? Thanks

                    G Offline
                    G Offline
                    Guffa
                    wrote on last edited by
                    #9

                    Look up MaxRequestLength. --- b { font-weight: normal; }

                    S 1 Reply Last reply
                    0
                    • G Guffa

                      Look up MaxRequestLength. --- b { font-weight: normal; }

                      S Offline
                      S Offline
                      Sean89
                      wrote on last edited by
                      #10

                      Thanks!

                      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