rejetto forum
May 25, 2012, 09:42:49 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: This forum is free, you do NOT need to register to post. But you may.
PROBLEMS? QUESTIONS? CLICK HERE!
Fill the survey!
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Upload form needs improvement  (Read 2001 times)
0 Members and 1 Guest are viewing this topic.
r][m
Insane poster
*****
Offline Offline

United States United States

Posts: 340


View Profile
« on: January 07, 2011, 10:05:46 AM »

Recently I had a family member try to up load a 600meg
file from a hostel wifi in Europe. He was on a real low
band width connection, and I finally had to call him to
let him know that it was going to take several hours.

We need a way to show the remote user their upload speed
and time left to finish, thats visable to the remote user
on the upload form.
I've tried adding symbols like %speed-in%. Wiki says
it works in all sections, but here it doesn't work anywhere?
Also tried %speed-kb%, %time-left%, %perc% and %speed%
but nothing works. I have the pop up progress window
but it lags behind, and symbols don't work in it either.

I think this would be far more useful than most things
already in the "to do list".

All my effots have failed.
Anyone have a solution that I could add to my template
upload form?
« Last Edit: January 07, 2011, 10:13:17 AM by r][m » Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1481



View Profile WWW
« Reply #1 on: January 07, 2011, 11:19:47 AM »

what you are asking work only in the section [progress] and its sub-sections through  var %progress-files%

Quote
inside main.pas

procedure addProgressSymbols();
...
 begin
  if sectionName <> 'progress' then exit;
....
    // apply fields
    files:=files+xtpl(t, [
      '%item-user%', macroQuote(d.usr),
      '%perc%',intToStr( trunc(perc*100) ),
      '%filename%', fn,
      '%filename-js%', jsEncode(fn, '''"'),
      '%done-bytes%', intToStr(bytes),
      '%total-bytes%', intToStr(total),
      '%done%', smartsize(bytes),
      '%total%', smartsize(total),
      '%time-left%', getETA(d),
      '%speed-kb%', floatToStrF(d.averageSpeed/1000, ffFixed, 7,1),
      '%item-ip%', d.address,
      '%item-port%', d.conn.port
    ]);
...
  end; // addProgressSymbols

you can use those variables %xxx% only in this part of the template:
Quote
[progress|no log]
<style>
#progress .fn { font-weight:bold; }
.out_bar { margin-top:0.25em; width:100px; font-size:15px; background:#fff; border:#555 1px solid; margin-right:5px; float:left; }
.in_bar { height:0.5em; background:#47c;  }
</style>
<ul style='padding-left:1.5em;'>
%progress-files%
</ul>

[progress-nofiles]
{.!No file exchange in progress..}

[progress-upload-file]
{.if not|{.{.?only.} = down.}|{:
   <li> Uploading %total% @ %speed-kb% KB/s
   <br /><span class='fn'>%filename%</span>
   <br>
   <div class='out_bar'><div class='in_bar' style="width:%perc%px"></div></div> %perc%%
:}.}

[progress-download-file]
{.if not|{.{.?only.} = up.}|{:
   <li> Downloading %total%
   <br>Speed: %speed-kb% KB/s
   <br /><span class='fn'>%filename%</span>
   <br>
   <div class='out_bar'><div class='in_bar' style="width:%perc%px"></div></div> %perc%%
:}.}
Logged
r][m
Insane poster
*****
Offline Offline

United States United States

Posts: 340


View Profile
« Reply #2 on: January 08, 2011, 01:10:31 AM »

@ Mars
Thanks for your reply.

%speed-kb% in progress window returns 0.0 here on uploads.
Wiki lists %time-left% as related to file transfers? Doesn't work here
in any file transfer sections.

So...your saying there is no way to improve this? Not even with
javascript?  Sad 


Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1481



View Profile WWW
« Reply #3 on: January 08, 2011, 11:35:17 AM »

It would be necessary to verify if the previous template before ajax raises the same problem, I have this small doubt which could be the solution Wink
Logged
r][m
Insane poster
*****
Offline Offline

United States United States

Posts: 340


View Profile
« Reply #4 on: January 08, 2011, 03:33:28 PM »

It would be necessary to verify if the previous template before ajax raises the same problem, I have this small doubt which could be the solution Wink
My template doesn't use AJAX.
I'm not a programer, but I fail to see why it wouldn't be possible to add
this capability to HFS. Without it users trying to upload have no way to
know if theres any reason to wait it out? A half hour to upload is one thing, three
hours is another. Knowing which its going to be is very desirable.
 I was never aware of it before, but I view it as a very serious problem/flaw here.
Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1481



View Profile WWW
« Reply #5 on: January 08, 2011, 05:22:40 PM »

with the default template of buid 272, replace the section with the same name by this code
Quote
[progress-upload-file]
{.if not|{.{.?only.} = down.}|{:
   <li> Uploading %total% @ %speed-kb% KB/s
   <br /><span class='fn'>%filename%
   <br>done : %done% (%done-bytes%)
   <br>time left :  %time-left%

</span>
   <br>
   <div class='out_bar'><div class='in_bar' style="width:%perc%px"></div></div> %perc%%
:}.}


* image.png (2.42 KB, 271x154 - viewed 102 times.)
Logged
rejetto forum
« Reply #5 on: January 08, 2011, 05:22:40 PM »

Do you like this software? Consider even $2
 Logged
maverick
Insane poster
*****
Offline Offline

Posts: 1056


Computer Solutions


View Profile
« Reply #6 on: January 09, 2011, 02:24:09 AM »

I agree with r][m there is a symbol problem with build 272 and probably other builds as well.

This is the first time I checked the upload progress for quite some time.  I also wasn't using the latest build before checking this today.  This was all done locally.

Build 240 - no problems
Build 272 - problems - I should also note that every upload I tried to make with this build FAILED.  Log reason was file NOT ALLOWED in Upload folder.  Have no idea why.

I didn't try to determine what build the problem started in.  I just don't have the time right now.  But it is definitely somewhere between build 240 & 272.

I'm attaching a couple of screen shots (one for each build I tried) that clearly show the results.

I use a customized template with absolutely NO javascript or ajax.


* Beta 240 Upload Progress.png (21.39 KB, 994x492 - viewed 125 times.)

* Beta 272 Upload Progress.png (26.46 KB, 992x518 - viewed 106 times.)

* Beta 272 Upload Failed.png (12.36 KB, 957x309 - viewed 103 times.)
Logged

maverick
MarkV
Insane poster
*****
Offline Offline

Germany Germany

Posts: 725



View Profile
« Reply #7 on: January 09, 2011, 02:54:37 AM »

Quote
I should also note that every upload I tried to make with this build FAILED.  Log reason was file NOT ALLOWED in Upload folder.  Have no idea why.

@Maverick: http://www.rejetto.com/forum/index.php/topic,9280.msg1052936.html#msg1052950
« Last Edit: January 09, 2011, 06:58:46 AM by Mars » Logged

Welcome to Twinkle Park! Grin
r][m
Insane poster
*****
Offline Offline

United States United States

Posts: 340


View Profile
« Reply #8 on: January 09, 2011, 04:18:49 AM »

Thanks Maverick
%symbols% problem goes back past 253 here. I was going to go back to
240 but it wont run on wine here. I like your progress page, does it close
when the upload finished page appears?

@ Mars
I'd try the progress-upload-file section you posted, with the default tpl, but
the last time I tried the default, it wouldn't work here? Anyway I use my
own tpl, since I don't have time to learn AJAX, and it doesn't look like
the default can be modified very easily.
Logged
maverick
Insane poster
*****
Offline Offline

Posts: 1056


Computer Solutions


View Profile
« Reply #9 on: January 09, 2011, 06:05:48 AM »

Thanks Maverick
%symbols% problem goes back past 253 here. I was going to go back to
240 but it wont run on wine here. I like your progress page, does it close
when the upload finished page appears?

Yes.

The only reason why I used build 240 was because it was the oldest build I had available on my drive.


@ MarkV
Thanks.  Looks like this problem was reported on and has been around for a while.  Strange that there wasn't a priority in fixing it.
« Last Edit: January 09, 2011, 06:34:55 AM by maverick » Logged

maverick
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1481



View Profile WWW
« Reply #10 on: January 09, 2011, 08:08:46 AM »

The build 272 has a known problem concerning access rights with a fatal effect on uploads, it's better to use 271 to test the reproductibvité of the bug of this topic.
 To have a base of common reference, it is necessary to use the template by default extracted of various version and to make tries with the same version of hfs.

The first template with ajax come at build 262

* default240.tpl (16.44 KB - downloaded 50 times.)
* default250.tpl (16.46 KB - downloaded 51 times.)
* default257.tpl (16.53 KB - downloaded 36 times.)
* default270.tpl (46.83 KB - downloaded 52 times.)
« Last Edit: January 09, 2011, 08:16:08 AM by Mars » Logged
r][m
Insane poster
*****
Offline Offline

United States United States

Posts: 340


View Profile
« Reply #11 on: January 09, 2011, 10:35:58 AM »

%speed-kb% didn't work here on 240 tpl in progress window.
Progress window lags several seconds behind up load, even at 1 second refresh.
Nothing in Progress Frame works here at all.
Testing locally with latest Firefox, hfs 270A on wine in Ubuntu 10.04

I still think the usable and efficient display of up load speed and time left
need to be improved.


* Screenshot1.jpg (12.06 KB, 239x279 - viewed 88 times.)
Logged
Mars
Operator
Insane poster
*****
Offline Offline

France France

Posts: 1481



View Profile WWW
« Reply #12 on: January 09, 2011, 10:53:44 AM »

Quote from: r
I still think the usable and efficient display of up load speed and time left
need to be improved.

refer to my post above http://www.rejetto.com/forum/index.php/topic,9361.msg1053058.html#msg1053058
Logged
r][m
Insane poster
*****
Offline Offline

United States United States

Posts: 340


View Profile
« Reply #13 on: January 09, 2011, 11:54:25 AM »

OK
Tried with build 246 and default tpl and inserted progress-upload-file code as posted.
Results were exactly same as 270A test.
Here %speed-kb% and %time-left% don't work.
%filename%, %total%, %done%, %done-bytes% and %perc% work.
Might be hfs.....or may be wine/ubuntu. No way to tell and for
now I can't afford the down time to test further.
Ideally this info should be visible on the upload form/page without
a screen flashing/lag 10 seconds behind, section/frame.
 

Another interesting discovery: I can add users via menu in 246.
In the more recent builds I can't.....thought it was a system problem,
now I know its not.

« Last Edit: January 10, 2011, 11:36:30 AM by r][m » Logged
r][m
Insane poster
*****
Offline Offline

United States United States

Posts: 340


View Profile
« Reply #14 on: January 12, 2011, 11:40:20 AM »

I tested 240 on win98se with IE6 and like Maverick %speed-kb% works.
%done%, %time-left% and %total% also work.
The [progress-upload-file] window works much better than in recent builds.

Next week as time permits, I'll test this with other builds,
and test on XP Pro.

@ Rejetto
Any help on this topic ?
« Last Edit: January 12, 2011, 12:06:18 PM by r][m » Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!


Google visited last this page May 18, 2012, 06:41:56 AM