rejetto forum

Upload form needs improvement

r][m · 19 · 11980

0 Members and 1 Guest are viewing this topic.

Offline r][m

  • Tireless poster
  • ****
    • Posts: 347
    • View Profile
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, 04:13:17 PM by r][m »


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
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%%
:}.}


Offline r][m

  • Tireless poster
  • ****
    • Posts: 347
    • View Profile
@ 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?  :( 




Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
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 ;)


Offline r][m

  • Tireless poster
  • ****
    • Posts: 347
    • View Profile
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 ;)
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.


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
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%%
:}.}


Offline maverick

  • Tireless poster
  • ****
    • Posts: 1052
  • Computer Solutions
    • View Profile
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.
maverick


Offline MarkV

  • Tireless poster
  • ****
    • Posts: 764
    • View Profile
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, 12:58:46 PM by Mars »
http://worldipv6launch.org - The world is different now.


Offline r][m

  • Tireless poster
  • ****
    • Posts: 347
    • View Profile
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.


Offline maverick

  • Tireless poster
  • ****
    • Posts: 1052
  • Computer Solutions
    • View Profile
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, 12:34:55 PM by maverick »
maverick


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
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
« Last Edit: January 09, 2011, 02:16:08 PM by Mars »


Offline r][m

  • Tireless poster
  • ****
    • Posts: 347
    • View Profile
%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.


Offline Mars

  • Operator
  • Tireless poster
  • *****
    • Posts: 2059
    • View Profile
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


Offline r][m

  • Tireless poster
  • ****
    • Posts: 347
    • View Profile
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, 05:36:30 PM by r][m »


Offline r][m

  • Tireless poster
  • ****
    • Posts: 347
    • View Profile
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, 06:06:18 PM by r][m »