I do application on Spring MVC where I need to store users photos. There are some ways to store files, but they have disadvantages:
in local storage - limit of host storage
in DB - cashe, limit of DB, long process of converting images to store in DB
I want ask you, is there some way to upload images(any files) on cloud service, for example https://i.onthe.io/ or google drive and then load them to my application (on JSP page).
There will be 2 steps to upload into Google Drive from a Spring application.
1.Implement Oauth2 Authorization - Either by using Google APIs or Spring OAuth2
2.Use Drive API Client Library for Java to upload/download files into Google drive.
Refer GoogleDrive API JavaDoc here.
Spring Cloud AWS maybe can help you enter link description here
Related
This is what I would like to build. A hosted web/api project built on APB where tenants can use the web application to define "Scan Definitions" that run inside their network. A scan definition would just contain a target IP Address to be scanned with WMI. They would download and install a windows service that would run periodically in their network. The service would communicate with the APB web API to retrieve scan definitions, then run the scan and upload the resulting scan data into the APB web API. Then the users would be able to view that scan data within the web app.
My question is with the CORS access in place, how can I make it so that the windows service is allowed to talk with the API. Also what is the best way to authenticate the service with api such that the service would know which tenant it should be using so that it pulls down the correct scan definitions and uploads the data to the correct tenant as well.
Thanks in advance for any help or guidance.
I was able to get a service up and running by following the abp sample found here: https://github.com/aspnetboilerplate/aspnetboilerplate-samples/tree/master/ConsoleRemoteWebApiCall/CallApiFromConsole
I still have things to work through, but it's gotten me to a spot where I can access the api from a console application
I have deployed a Spring-boot application on Google cloud. This is a web application in which the JS client captures frames from the camera and sends it back to the server. The server processes these images and stores them in a directory. This application works perfectly fine locally and on the Google cloud. But on the cloud, I am not able to locate the directory created by the application. Could you please suggest a possible solution?
In the Google App Engine Environment, the local filesystem that your application is deployed to is not writeable. This behavior ensures the security and scalability of your application.
If your application needs to save and write files I suggest you take a look at this document where you can find different kind of solutions, for example, as per is mentioned at the document:
"App Engine creates a default bucket when you create an app. This bucket provides the first 5GB of storage for free and includes a free quota for Cloud Storage I/O operations. You can create other Cloud Storage buckets, but only the default bucket includes the first 5GB of storage for free."
I am trying to create a middleware between SAP and Salesforce. It is a .NET RESTful service.
If SAP desires any data, it will pass parameters to my .NET API which in turn will query Salesforce for the same. It should fetch the data and return as XML to SAP.
My first step is to build a webAPI and fetch sample data (about 10-20 rows) from Salesforce developer account.
I referred to Salesforce documentation on how to setup Remote Access for external applications which uses oAuth. The Remote Access documentation page looks a bit obsolete.
I want to know whether I need to enable Remote Access first in Salesforce and expose endpoints for my .NET Service to consume it? Where can I find updated Remote Access oAuth documentation for interacting with the .NET webAPI?
The link I referred is this: Consuming Force.com SOAP and REST Web Services from .NET Applications
I'm developing a backend service in NodeJS. It processes images from Google Cloud Storage by requesting a temporary link and sending this link to a third party analysis service. I'd also want the images to be added to a shared Google Drive folder. Is there any possible way to do this easily (e.g. by using the Drive API and posting the link to the file, instead of downloading the file and subsequently uploading it). In other words: does the Drive API accept links to files, instead of uploading them? Or is there any other clever way of sharing Google Cloud to Drive easily (as it's both Google services).
Thanks
The best way to do this right now would be to use a Google Colab notebook:
Create a Google Colab notebook and connect to your GCP bucket and mount Google Drive to it:
# authenticate
from google.colab import auth
auth.authenticate_user()
# set your gcp project
!gcloud config set project my-project
# mount your drive
from google.colab import drive
drive.mount('/content/drive')
Run a gsutil command to copy your GCP storage data to the mounted drive
!gsutil -q -m cp -r gs://my-bucket-name /content/drive/My\ Drive/
I have done some searching but, I don't see a way to add files from Google Cloud Storage to Google Drive other than doing downloading and uploading them. Also AFAIK, gsutil, which Google Cloud Storage APIs can interact with, also supports downloading and uploading of files when sharing to other storage.
And, as answered in Cloud Storage - Frequently Asked Questions, Google Drive and Google Cloud Storage are two different storage services wherein both allow programmatic access to their functionality, but the goals of the APIs are quite different.
However, you may want to try using Request Endpoints wherein you can access Google Cloud Storage through three request endpoints (URIs). Which one you use depends on the operation you are performing.
IMPORTANT NOTE: The Google Cloud Storage URIs described on this page are subject to change.
You can use the following URLs to access an object:
XML API
storage.googleapis.com/<bucket>/<object>
<bucket>.storage.googleapis.com/<object>
JSON API
www.googleapis.com/download/storage/v1/b/<bucket>/o/<object-encoded-as-URL-path-segment>?alt=media
These URLs support secure sockets layer (SSL) encryption, which means you can use either HTTP or HTTPS. If you authenticate to the Google Cloud Storage API using OAuth 2.0, you should use HTTPS.
You may want to also check Sharing and Collaboration for more information.
I need to store user data to my google cloud storage bucket.
I'm running laravel on google compute engine.
Could someone assist with this?
I've found only tutorials for google app engine so far.
The Google Cloud Storage JSON API is a simple, JSON-backed interface for accessing and manipulating Google Cloud Storage projects in a programmatic way.
You will need to use Google APIs Client Library for PHP to send requests to the Google Cloud Storage JSON API. See the links below for more info and examples:
https://cloud.google.com/storage/docs/json_api/
https://cloud.google.com/storage/docs/json_api/v1/json-api-php-samples