Still have problem sending graphic to server

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Ron Zellner
Posts: 106
Joined: Wed May 31, 2006 9:56 pm
Contact:

Still have problem sending graphic to server

Post by Ron Zellner » Fri Nov 06, 2009 9:29 pm

I am trying to send a snapshot of a portion of the screen to my server.
The initial step works fine- making a local png file:

Code: Select all

  export snapshot from group "Concept Map Group"  to URL ("binfile:"&tSnapshotPath&"/" &the seconds & ".png") as PNG
tSnapshotPath is the path to where the .rev file is stored and the png file appears where expected.

Then I'm using the following to send a copy of the file to the server:

Code: Select all

    put URL("binfile:"&tSnapshotPath&"/" & field "StudentName"  &the seconds & ".png") into URL ("ftp://MyLogonID:MyPassWord@ServerAddress.edu/TestFile.png/Library/WebServer/Documents/320EPSY2009/MapCollection")
"Library/WebServer/Documents/320EPSY2009/MapCollection" is my current estimate of the remote path. I've tried variations, Like
"http://MyServer/Library/WebServer/Docum ... Collection"

When I click the button I get the local file and nothing else- no error statement- No files appear anywhere on the server.

Any insights or solutions would be greatly appreciated, I've tried all the variations I can think of.

Also, is it possible to just create the file directly on the server?
Something along these lines?

Code: Select all

export snapshot from group "Concept Map Group"  to URL ("ftp://MyLogonID:MyPassWord@ServerAddress.edu/TestFile.png/Library/WebServer/Documents/320EPSY2009/MapCollection") as PNG

Ron Zellner
Posts: 106
Joined: Wed May 31, 2006 9:56 pm
Contact:

Partially working

Post by Ron Zellner » Sat Nov 07, 2009 12:11 am

I tried it with an older server and I can get it to upload-

the problem seems to be that it is probably uploading but not going to the anticipated location on the OS X Leopard server.
So. I'm closer.

andrew@ugh.net.au
Posts: 13
Joined: Sun Dec 17, 2006 12:30 pm

Re: Still have problem sending graphic to server

Post by andrew@ugh.net.au » Sat Nov 07, 2009 10:32 pm

Ron Zellner wrote:

Code: Select all

    put URL("binfile:"&tSnapshotPath&"/" & field "StudentName"  &the seconds & ".png") into URL ("ftp://MyLogonID:MyPassWord@ServerAddress.edu/TestFile.png/Library/WebServer/Documents/320EPSY2009/MapCollection")
That URL looks dodgy - are you sure TestFile.png shouldn't appear at the end rather than the middle?

If that doesn't help then have you tried FTPing the file up by hand? That will verify the FTP server is running, your user name and password are right, that you have the right permissions etc.

The FTP server's log might help as well. I'd probably use wireshark as well but if you aren't familiar with it you might need to practice a bit before it's useful.

HTH,

Andrew

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Sun Nov 08, 2009 2:49 pm

Does it work if you also specify the remote file name, not just the remote directory, in your FTP url?

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

Ron Zellner
Posts: 106
Joined: Wed May 31, 2006 9:56 pm
Contact:

This sort of works,

Post by Ron Zellner » Sun Nov 08, 2009 9:39 pm

Yes, the last path that I posted was incorrect - I had been trying several variations trying to solve the problem and it deteriorated.
The following format worked when I used the administrator logon information:
The file is created with this code (this part works):

Code: Select all

 Put the seconds into UploadTime
  export snapshot from group "Concept Map Group"  to URL ("binfile:"&tSnapshotPath&"/" & field "StudentName" & UploadTime & ".png") as PNG
And then this to submit

Code: Select all

  put URL("binfile:"&tSnapshotPath&"/" & field "StudentName" & UploadTime & ".png") into URL ("ftp://administratorID:AdministratorPW@server.name.edu/320EPSY2009/MapCollection/"&  field "StudentName" & UploadTime & ".png")
The file gets named using the student name and the current time so it is different each time.
It may be an issue of paths and/or permissions. I can't seem to repeat it when trying from home.
Consequently, before it goes to students I also need to check issues of FTP & VPN for submissions from off campus.
Is there a good source of information regarding the basics of these functions.?
I'm checking this one now:
http://lessons.runrev.com/spaces/lesson ... -using-FTP

Ron Zellner
Posts: 106
Joined: Wed May 31, 2006 9:56 pm
Contact:

Not a Revolution problem, it is an FTP/Server path problem

Post by Ron Zellner » Mon Nov 09, 2009 8:21 pm

The Revolution upload seems to work OK. The problem relates to specifying the proper path for the individual account on the server.

I need to check the server account manager to determine why some accounts don't work properly.

Thanks for the input.

Post Reply