Hi,

The idea to keep incrementing the file sounds good, and I could do it
on the upload end, but I am not sure on the browser end to keep making
the browser get the latest, or second latest file on the website.  I
am using this type of HTML command in the page to make it refresh
automatically in the browser:

 <meta http-equiv="Refresh"
 content="2,URL=http://www.members.shaw.ca/roger.zimmerman/
sharedesktop/refresh.html">

Where the 2 sets the delay in seconds before a refresh. And within the
refresh.html page it puts up an imaged called something like
screenshot.jpeg.  The screenshot.jpeg gets set to 0 bits right on my
website, so there is nothing the browser can do anymore to get it. It
stays at 0 bits, even after I stop the browser and stop the automated
ftp code from putting a new screenshot.jpeg up on the site.  The next
time I run the ftp code (without the browser running), the
screenshot.jpeg gets updated correctly on the site (except
ocassionally I need to delete screenshot.jpeg first then run the
automated ftp code).

Here is what I am using for the automated ftp code, I have tried
"send" in a loop or just copied the Send command over and over for
now. I commented out the loop I used to use, because it had to keep
opening and closing the connection every time it did a send. Any ideas
to fix that loop so it doesn't have to open and close the connection
each time is also appreciated:
____________________________

#!/bin/sh

HOST='ftp.shaw.ca'
USER='roger.zimmerman'
PASSWD='password'

# echo -n "aftervariables${i} "

#for i in $(seq 1 100)

#do

ftp -n ftp.shaw.ca <<SCRIPT
user $USER $PASSWD
send screen2.jpeg /sharedesktop/screen2.jpeg
send screen2.jpeg /sharedesktop/screen2.jpeg
send screen2.jpeg /sharedesktop/screen2.jpeg
send screen2.jpeg /sharedesktop/screen2.jpeg
send screen2.jpeg /sharedesktop/screen2.jpeg
send screen2.jpeg /sharedesktop/screen2.jpeg
quit
SCRIPT

#done

exit

_________________________________

For the suggestion on the file size on download, I am not sure how
that applies, because that is on the browser end, and the file has
already been set to 0 bits on the server end, so there is no file
there to download.

Good suggestions, keep them coming, I feel like I am so close to
getting this working, but stuck against a wall now. This would be so
cool if it worked!

Roger

>
> If you are just using a default file name for the screenshot then it
> will just overwrite the file which you have uploaded.
> Maybe you can find a way round this.
> It's not something I have tried but one possible solution could be
> that you file upload could have some way of incrementing the file name
> to upload.
> eg file1.jpg, file2.jpg etc
>
> Also I have noticed that when I am downloading from the internet the
> file name on my machine will be something such as
> myapp.bin  with a size showing from ls -l as 0 and with it will be
> another file with a name myapp.bin_part.
> It's size grows until the download is complete and then the myapp.bin
> has the correct size and myapp.bin_part disappears.
> So it might be possible to have the automatic refresh on your friends
> machine detect that change and not actually refresh until the file is
> fully uploaded.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Ubuntu Linux" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/ubuntulinux?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to