FTP to Google Cloud - google-app-engine

I need to write ftp script to move the file from File location to google cloud.
I could do this manually using CrossFTP. where it does have component to connect to Google cloud using Access key and secret key. but when i use FTP script i am not able to connect it.
If I want to use traditional FTP way for google cloud what should be server name and user ID and pass. I tried using commondatastorage.googleapis.com But it does work with access key and secret key.
Any information will be helpful.
All I need is, I need to automate this FTP process.

If you're automating using a shell script, you can use gsutil. This allows you to upload / download files, modify ACLs and so on.

Related

Logic apps encrypt/decrypt connectors

I need to pgp encrypt a file before I move it to a specified location in logic apps. I can see a file system connector that i can use to copy files etc. But i am not able to find a connector to PGP encrypt/decrypt. My guess is souch connector does not exist, if so what is the best way to create a custom connector for this?
There's an Azure Function for that. You'd need to deploy this function configure keys, probably in the Azure Key Vault and then call the function from your logic app.
https://github.com/lfalck/AzureFunctionsPGPEncrypt

Moving files between folders in Google Cloud Storage with Google Cloud Console

I have uploaded several files into the same folder on Google Cloud Storage using the Google Cloud Console. I would now like to move several of the files to a newly created folder in Google Cloud Storage and I cannot see how to do that via the Google Cloud Console. I found instructions to move the files via command prompt instructions on gsutil. However, I am not comfortable with command line interfaces and have not been able to get gsutil to work on my machine.
Is there a way to move files in Google Cloud Storage from one folder to another via the Google Cloud Console?
Update: Google Cloud Shell provides a terminal within the Google Cloud Console site without having to manually create VMs; it comes with gsutil and Google Cloud SDK pre-installed and pre-authenticated.
Prior answer: If you're having issues installing gsutil on your computer, consider the following approach:
Spin up an f1-micro instance with the Google-provided Debian image which will have gsutil preinstalled.
Use the SSH button to connect to it using the browser interface (you can also use gcutil or gcloud commands, if you have those installed and available).
Run gcloud auth login --no-launch-browser within the instance. It will give you a URL to open with your browser. Once you open it, grant the OAuth permissions, and it will display a code. Paste that code back into the command-line window where you ran the command so that it gets the authentication token.
Run the gsutil mv command, as suggested by Travis Hobrla:
gsutil mv gs://bucket/source-object gs://bucket/dest-object
Once you're done with gsutil, delete the instance by clicking on the Delete button at the top of the VM instance detail page. Make sure that the box marked "Delete boot disk when instance is deleted" on the same VM instance page is checked, so that you don't leave an orphaned disk around, which you will be charged for.
You can also browse your persistent disks on the "Disks" tab right below the "VM instances" tab, and delete disks manually there, or make sure there aren't an orphaned disks in the future.
Given the current price of $0.013/hr for an f1-micro instance, this should cost you less than a penny to do this, as you'll only be charged while the instance exists.
There is not currently a way to do this via the Google Cloud Console.
Because folders in Google Cloud Storage are really just placeholder objects in a flat namespace, it's not possible to do an atomic move or rename of a folder, which is why this scenario is more complex than doing a folder move in a local filesystem (with a hierarchical namespace). That's why a more complex tool like gsutil is needed.
Google Cloud Storage now has the functionality to move files from one folder/bucket to another using Cloud Console. To do this, simply select the file(s), click on the 3 vertical dots to get the option of move. Select the target folder/bucket to move the file.

Display onedrive filelist on my website

Here is the basic concept of what I am trying to do. My web app allows my clients to log in to a dashboard.
One of the things I want to show on their dashboard is THEIR work files.. ie: PDF files.
I store these files in OneDrive in a seperate folder for each client
Root Doc Directory
- Client A
- File1.pdf
- File2.pdf
- Client B
- File1.pdf
etc
so when client A logs in, I want to show all the files in the ClientA folder...
concept sounds simple, and with storage on my own server, I can do this easy, but I cant find how to do it using OneDrive...
Does anyone out there have any ideas?? All the info I have found about OneDrive APIs requires users to actually log into onedrive which I dont want.
Basically you're using OneDrive wrong. You should be asking each user of your service to sign in with their Microsoft Account and store the files in the user's OneDrive. Storing them all in your OneDrive means they can't access those files outside of your app (like by logging into OneDrive). Instead of using Microsoft Account as the security for those files, you're putting all of the security requirements on your own ability to protect access to your OneDrive account. Basically, doing it way you proposed is strongly not recommended.
You can pretty easily integrate OAuth into your website so that a user can connect your site to OneDrive and then have access to their files from OneDrive in your service.
The alternative would be to use something like Azure Blob Storage to store/retrieve these files. Then your app would just have the set of access keys required to access storage and you wouldn't have to deal with signing into a single OneDrive account from the service and keeping the access and refresh tokens up to date.

AngularJS and Ruby on Rails - Uploading multiple files directly to Amazon S3

I'm writing an app where users can write Notes, and each note can have many files attached to it.
I would like users to be able to click 'Browse', select multiple files, which will be uploaded when the user clicks 'Save Note'.
I want these files to be uploaded directly into Amazon S3 (or some other cloud storage solution?) without going through my server, so I don't have to worry about uploads blocking my server.
What is the best way to accomplish this?
I have seen many examples to upload directly into Amazon S3, but none of them support multiple files. Will I somehow have to do this all in Javascript by looping through a collection of files selected with the Browse button?
Thanks!
Technically, your javascript residing in the browser could make HTTP RESTful calls to AWS and store data in S3, but then you would be exposing the security credentials to connect to AWS in the script.. not good.
I guess the only way is to process it thru a web-server which can securely access AWS and store the notes.. or, you could just write those notes to a local disk (where the webserver sits), and schedule tools like s3cmd to automatically synch them with S3 buckets.

How do i upload external files onto my server using AD credentials?

i want some of my users to be able to go home and upload their files from Home PC's by going to say www.mydomain.com/upload
it will ask for their windows username and password then take those files and upload them to their re-directed folder on the fileserver...
im guessing SSL encryption is a start (or probably my last step). Can i do a VB script server ened and a runas - Copy?
Uh... you've got the right idea, but step back a moment.
There are two main options:
* WebDAV - Anyone with a modern OS can configure "Web Folders". Windows will present the network location as a filesystem folder where users can simply drag and drop files to upload them. This requires configuring IIS.
* A web-based file upload script - There are many of these around, however very few of these integrate authentication with IIS and support Kerberos. You do not need TLS/SSL for Windows Authentication or Kerberos, but it might be a good idea anyway. You may need to write your own if you can't find what you want, however VBScript is not appropriate as it has no built-in support for Identity Impersonation or handling file uploads with ease (it is possible, but not very easy). You're better off using PHP or ASP.NET
HTH.

Resources