[Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

ASP Upload Challenge

Posted on 2004-11-28
9
Medium Priority
?
194 Views
Last Modified: 2010-04-07
To augment your average ASP file upload script I would like to use a Flash progress bar and I'm looking for some ideas. Any ideas, really. One thing that would seem to work is to have a flash movie with a SetInterval on frame one, with the setInterval function being getURL or loadVariables ("GetBytesLoadedEtc.asp"), so that I would keep getting new data to feed to a progressbar until using a clearInterval when getbytesloaded is equal to totalbytesinfile as dictated by the asp script.  

If that were a problem I might have the asp script continually write to a server side text file its progress info and then the setInterval would be a loadvariables on that text file over and over again.

Does anybody know of a better method or have any suggestions about trying to do it this way?
0
Comment
Question by:MPYACCESS
  • 5
  • 3
9 Comments
 
LVL 9

Expert Comment

by:AgentSmith007
ID: 12693570
Good idea...I've never tried to do this, but it does seem quite possible.

With all the ASP file upload scripts I've used in the past, there's a way to set a progress ID on a file you wish to upload, and then, it is possible to query that progress ID with size total, size uploaded & all that stuff. In samples provided, this is conventionally done with a page that has an auto-refresh occuring every secord or two.

I'd say the best way to get the variables from flash, and the means I always use to get database data into flash, is to essentially create an ASP file that returns an XML document, then parse the XML document from flash for all the variables. SO, you could tell flash to pull the progress info every 50 frames or so. This is all little-more than conceptual at the moment, but if you wanted to provide me with what ASP Upload component you're using, I could probably find some time to throw a basic sample together.
0
 
LVL 27

Expert Comment

by:negatyve
ID: 12694016
While you need javascript to tell flash the upload is ended, you could just pass loading variables to flash using the same way..
0
 
LVL 9

Expert Comment

by:AgentSmith007
ID: 12694046
Except for the fact that the loading variables are determined on the server side. The page would need to have auto-refresh code (which with default IE configuration makes an annoying clicking noise upon refresh)
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:MPYACCESS
ID: 12696152
Thanks.

I'm leaning toward using ASPUpload (www.aspupload.com) to ensure reliability, and they do have a progress ID, but as for using it, their manual refers only to this ugly sort of proprietary thing (http://www.aspupload.com/manual_progress.html).

The reason for ASPUpload is that I need an upload component that will accept all kinds of data, can handle as much as 100MB files, and that will play well with other COM object methods which will be used to process an uploaded file as soon as it is uploaded.

"The page would need to have auto-refresh code..." Yes? Unless it would cause a "script in this movie is causing Flash Player to run slowly" error, my idea at this point is your idea of having the ASP script write a text/xml file every time another 1% is completed and Flash just keeps reading the file with a function() called by SetInterval that uses ClearInterval when it obtains 100%.

The ASPUpload component does use auto-refresh for its HTML method, but how would having the browser refreshing figure into this flash process? I'm hoping flash might avoid the need for auto-refresh.
0
 
LVL 9

Expert Comment

by:AgentSmith007
ID: 12697011
hey MPY, Flash would absolutely eliminate the auto-refresh issue as long as you load your variables correctly. I was posting a rebuttal to an alternate solution. Anyway, I have to run right now, but I'll post a little sample on my web server later on.
0
 

Author Comment

by:MPYACCESS
ID: 12702548
Thanks in advance for anything you can demonstrate.
0
 
LVL 9

Expert Comment

by:AgentSmith007
ID: 12702908
MPYACCESS,

I'm sorry I haven't posted something already. I've been working on trying to get the browse dialog right in flash, however it doesn't look like this is gonna work b/c even though I can get the choose file dialog to display & the selected filename to populate, I cannot (seemingly for security reasons) submit that data. I'll get on this tomorrow to make the flash portion only handle the progress indication. Sorry again.
0
 
LVL 9

Accepted Solution

by:
AgentSmith007 earned 2000 total points
ID: 12723458
MPY,

I've been super busy lately and have only put a little time into this tonight, but i'm getting frustrated with it. The reason is, I think the aspupload.com progress indicator inplementation is a little bass-ackwards. Anyway, the general idea is to create a simple variable file via asp that generates your transfer variables in this manner:

Total=[total size]&Transferred=[amount transferred]

etc, and call that ASP file from flash via loadvariables (make sure you load it using http://webserver/whatever.asp so that it processes the ASP variables) and just every 30 frames or so programmaitcally do the loadvariables again...

Anyway, i can't see myself putting much time into this in the immediate future, so I apologize for any unfullfilled expectations. Let me know if you have any more questions about this though.
0
 

Author Comment

by:MPYACCESS
ID: 12725552
Thanks. I know you made an effort with it, and I appreciate it!
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my long career of working as an actionscript developer, I had spent sleepless night often working hard to solve some small problems which actually took a lot of my development time; later found out the solutions to be a line or two. Here are s…
I have found that much of my time doing support ends up being a constant repetition of the same steps to different people.  Early on I stated using web pages with Frequently Asked Questions (FAQs) to alleviate most of the burden.  Sometimes this jus…
In this tutorial viewers will learn how to create a basic motion tween animation in Flash Open a new document in Flash: Draw/import an image: Press CTRL + F8 to convert it into a graphic symbol: Select a frame (how long you want the tween to last): …
The goal of the tutorial is to teach the user how to set there setting in Adobe Flash Media Live Encoder and YouTube for optimal video and audio quality.
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question