Vectorlight News

  • Chat App Converted to HTML and JQuery
    Sep 08, 2011

    Converted from Silverlight to HTML and Javascript/JQuery is the Vectorlight Chat App. Login using your Vectorlight password to chat using your username and avatar.

  • HTML5 iPhone,Android Big Guns Tower Defense
    Jul 02, 2011

    Big Guns has made the leap from Windows Phone 7 (XNA) to HTML5 so you can now play it on your iPhone, Android and other HTML5 compatible devices.

  • HTML5 Games - Word Poppers and Batty
    Jun 04, 2011

    As the take-up of HTML5 quickens (74% of users currently have a browser capable of HTML5 Canvas) we present two more games for both your browser and mobile.

  • Big Guns Tower Defense on Windows Phone 7
    May 06, 2011

    Coming soon to Windows Phone 7 is an XNA port of the popular Vectorlight tower defense game Super Tower Defense. Whilst retaining many of the graphical and gameplay features of the original Silverlight game.

  • Wakacube WP7 Update
    Apr 26, 2011

    Released to the Windows Phone 7 marketplace today is Version 1.1 of Wakacube the 3D physics game of skill. Included in the update are more levels (30 in total) and new mode Wakatime which generates random crate structures to keep players entertained long after the levels have been completed.

  • Home Page News
bvdd
bvdd
Files bigger than 32Kb Posted: Dec 19, 2009
 

Hi Dan,


I'm using your Fileupload-control in VB.NET so I had to convert the sample code from your tutorial.

I've got everything working nicely, except that for some reason I can only upload 32Kb. Files that are bigger only get saved for the first 32Kb.


Weird thing is that the target-variable and the writer-variable always have the exact same length as the initial content byte array, so one would expect everything went smoothly...


Do you have a clue what might be going wrong?

I'm testing this locally btw, so it aren't serverside issues. And I doubt that it has to do with my web.config since normally you're allowed to upload up to 4MB by default.


Thanks in advance!

Bart

 
 
dan
dan
RE: Files bigger than 32Kb Posted: Dec 24, 2009
 

Hi Bart,


Sure, the web.config setting has nothing to do with this uploader as the component uses web services to upload the file in chunks.  I imagine the first chunk is being transmitted but not the rest.


Firstly, are you using the same web service provided with the demo?  Does your Upload() web service method return the string "ok", this is important to ensure the uploader sends all packets of information.


Thanks!

 
 
constantine
constantine
RE: Files bigger than 32Kb Posted: Feb 19, 2010
 

Just Uncomment the bold part.


//public string Upload(string id, string mode, string path, string name, string targetname, string filedata, bool overwrite, string tag, bool final)

    public string Upload(string id, string mode, string path, string name, string filedata, bool overwrite, string tag, bool final)

    {

        string filename = string.Empty;


        if (!path.StartsWith("ClientBin/"))

        {

            return "";

        }


        name = Regex.Replace(name, "[^a-zA-Z0-9 \\-\\._!]", "");

        if (name.EndsWith(".dll") || name.EndsWith(".ascx") || name.EndsWith(".aspx"))

        {

            return "";

        }


        try

        {

            filename = Server.MapPath("~") + @"\" + path.Replace("/", @"\") + name;


            if (mode == "new")

            {

                if (File.Exists(filename) == true)

                {

                    if (overwrite)

                    {

                        File.Delete(filename);

                    }

                    else

                    {

                        return "File Already Exists";

                    }

                }


                WriteFile(filename, Convert.FromBase64String(filedata), FileMode.Create);

                //WriteFile(filename, System.Text.Encoding.UTF8.GetBytes(filedata), FileMode.Create);

                

            }

            else

            {

                WriteFile(filename, Convert.FromBase64String(filedata), FileMode.Append);

            }

        }

        catch (Exception ex)

        {

            File.Delete(filename);

            return "File Write Error: " + ex.Message;

        }


        return "ok";

    }

 
 
thewebguru
thewebguru
RE: Files bigger than 32Kb Posted: Apr 28, 2011
 

Hi


I found this to be the problem in my case


http://www.vectorlight.net/forums/liquid_components/1374-file_explorer_uploader_-_32kb_limit.aspx


Cheers


Mark

 
 

Rate this: 

1 Star 2 Star 3 Star 4 Star 5 Star
8 Ratings / 2.5 Average