Here’s the part that I think you missing:


Your user goes to the page:



                www.yoursite.com/ftp_cart.taf



ftp_cart.taf in turn logs into the FTP server, reads the root directory and 
displays an HTML page of options (files and folders) to the user.



The user then clicks a folder (say folder1) which looks like this:



                www.yoursite.com/ftp_cart.taf?browse=/folder1



ftp_cart.taf, now with a path argument, logs into the FTP server and retrieves 
the path given and displays it to the user as a nice HTML page.



Now let’s say the user clicks a file to add to his cart:



                www.yoursite.com/ftp_cart.taf?add=/folder1/file2.pdf



now, you know “folder1” so you can derive “$10.00”. And you know the full path 
and filename so you can download the file and present it to the user with a 
Witango script.



Hopefully that gives you some idea of how your Witango application will act as 
a “window” to the FTP site and allow you to apply all the necessary logic. This 
is similar to building an HTML email client in Witango, or perhaps accessing 
information stored in XML files or on remote sites through web services (eg. 
RSS). In this case, the remote data source just happens to be an FTP site.



Unfortunately, Witango 5/5.5 doesn’t help you here at all. I’m working hard to 
get Witango 6 out soon, and the server-side FTP functions should help you to 
develop this functionality easily.



Robert







From: WebDude [mailto:webd...@cipromo.com]
Sent: Monday, November 22, 2010 10:42 AM
To: Witango-Talk@witango.com
Subject: RE: Witango-Talk: OT - FTP interactions



Well, call me dumb, but where could I get information on how to do this. I am 
having a hard enough time just trying to display a directory of images thorugh 
the http protocol. Are you saying that we could let the customer traverse the 
ftp site via the ftp protocol (i.e. ftp://test1/test2/test3/file.pdf 
<ftp://test1/test2/test3/file.pdf> ) ? I get that part, but when they click, 
how do you capture that filepath and file and insert the info into a db?



or am I missing something here...



By the way... thanks...









  _____

From: Robert Shubert [mailto:rshub...@tronics.com]
Sent: Monday, November 22, 2010 9:28 AM
To: Witango-Talk@witango.com
Subject: RE: Witango-Talk: OT - FTP interactions

Well, I’m not sure how you would generate a thumb of a specific PDF. I suppose 
your could use a tool that renders PDF to JPEG, but that could get a little 
complex.



Other than that, this is straight forward. Simply traverse the FTP structure 
through the FTP protocol. Think of it like working with an XML file.



Robert



From: WebDude [mailto:webd...@cipromo.com]
Sent: Monday, November 22, 2010 10:11 AM
To: Witango-Talk@witango.com
Subject: RE: Witango-Talk: OT - FTP interactions



Mmmmm...



This FTP site is not in my control. It is housed by a third party and as far as 
I know it has no http capabilities. We will not be able to add meta-data or 
control the directory/file structure in any way. Nor will we know ahead of time 
what the file structure is or the filenames within any of the directories. All 
we will be getting is a list of the directories (maybe multiple levels) and a 
username and password. From this they want to display thumbs of pdf files 
within these directories and when a thumb (pdf file) is clicked, add the thumb 
(filename, I would suspect) into a basket built on our end along with the price 
via the directory the pdf file happened to be in.







  _____

From: Robert Shubert [mailto:rshub...@tronics.com]
Sent: Monday, November 22, 2010 8:46 AM
To: Witango-Talk@witango.com
Subject: RE: Witango-Talk: OT - FTP interactions

This doesn’t seem too hard.



I think I would first try using the FTP site as if it were a database. This may 
be too slow, however, depending on the amount of content in the FTP server and 
the load on the site, but I would probably add simple memory caching rather 
than trying to sync a db.



Witango 6 will be able to implement something easily as it directly supports 
server-side FTP now.



The rest is just logic. (@IF foldername=folder1 @ASSIGN price 10)



You could even put meta-data files in each directory (or for each file) with 
descriptions and prices.



Doesn’t sound altogether unreasonable.



Robert





From: WebDude [mailto:webd...@cipromo.com]
Sent: Monday, November 22, 2010 9:02 AM
To: Witango-Talk@witango.com
Subject: Witango-Talk: OT - FTP interactions



This is way off topic, but I have a client who is asking some questions that I 
am having a hard time answering. I was hoping some of you with more knowledge 
then I can give me some direction. I see all sorts of probems with this, but am 
trying to figure out what to say to him. I believe the files he is talking 
about are pfd files. I would think, first off, that you would need at least to 
have the directory structure along with filenames loaded into the DB before you 
could do anything he is asking me to do. In other words, it sounds like he 
wants to "crawl" the ftp site and load the information into a db. And then just 
display the files via thumbs, probably clicking them to add to a basket system, 
etc. Don't shoot me on this, I am just the messenger, but below is what is 
being asked for word for word from the client...



"I have a couple of key questions, one is how can a database interact with a 
FTP?  Could a DB pull thumbnails from an FTP and display them on the web?  
Could a DB understand from a folder location on a sever what value to assign to 
it?  For example if the DB searched the server for a file, and file’s location 
was in folder 1, could it assign a price to it, if the DB understood all items 
in folder 1 have a $10 value?"



My head hurts. I think he wants to be able to have the client find these files, 
add them to a basket system, and download them when done.











  _____

To unsubscribe from this list, please send an email to lists...@witango.com 
with "unsubscribe witango-talk" in the body.



  _____

To unsubscribe from this list, please send an email to lists...@witango.com 
with "unsubscribe witango-talk" in the body.



  _____

To unsubscribe from this list, please send an email to lists...@witango.com 
with "unsubscribe witango-talk" in the body.



  _____

To unsubscribe from this list, please send an email to lists...@witango.com 
with "unsubscribe witango-talk" in the body.



  _____

To unsubscribe from this list, please send an email to lists...@witango.com 
with "unsubscribe witango-talk" in the body.



----------------------------------------

To unsubscribe from this list, please send an email to lists...@witango.com 
with "unsubscribe witango-talk" in the body.

Reply via email to