Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP Cloud Storage Access

Status
Not open for further replies.

WIREMESH

Programmer
Mar 15, 2004
109
0
0
US
I have web application that enables clients to upload and store images (pdf, png, etc.). As the clients space demands grow, I would like to store their images on a cloud server. They will continue to use the web application to upload files to my Windows 2008 server. I have a vfp application running in the background that will copy the files to the cloud storage and then delete from the server.

Each client will be responsible for setting up their cloud accounts and storing their login credentials. using my web app. These accounts could be Microsoft Onedrive, Google Drive, DropBox, Box, etc. Initially, I would like to maintain either Onedrive or Google Drive. From my windows based VFP app I plan on using each user's credentials to upload and/or delete files in the cloud. What is the cloud storage option provides the simplest implementation with VFP?
 
Many of the cloud services you mentioned have APIs which let you upload and download files programmatically. Just to give one example, the Dropbox API is documented at
Inevitably, each of these APIs will be different, so you will have to research each one individually. But all the information you need should be available at the respective sites. Many of them probably also have their own forums where you can get help. (But if you post a question in one of those forums, for goodness sake don't mention FoxPro. Just frame the question in general terms, then come back here if you need it to be "translated" into FoxPro.)

If a given service does not have an API, you might be able to automate the process using the Web Browser control. But that would be less satisfactory, and the method of doing so would still need to be specific to the cloud service in question.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Actually the authorization processes of modern services, not only cloud storage, are based on protocols like OAuth, users don't give you their credentials, but your application asks for access to a certain user account and a certain functionality from both the service and your user, the user confirms he wants your service to get that access, eg file uploads and you get an access token, not their credentials. They have to login during that process, but they do that themselves, not let you do it.

The token you get is like a secondary key and they can revoke access on the one side, without needing to change their credentials, and they also can change their credantials without invalidating your access token. Just a side note, users are often not aware of this, which is a downside, but that leads a bit off topic. If you don't follow this practice and use credentials of users on behalf of them, even if you do so on good deeds these credentials may become "smelly", sites seeing logins from the users themselves at home and from your server might get suspicious alone from the ip adresses, that'll neither be good for you nor your users.

Anyway, you better first make yourself familiar with some APIs, then such things will follow naturally, as authentication is a first step in using these APIs anyway.

Bye, Olaf.
 
I've just been glancing at the Dropbox documentation (in the link I gave, above). It does seem very easy to provide a way for users to upload their files to their Dropbox account, with very little programming needed. I don't know if other services provide similar features, but it does look promising.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top