1C - Google Drive

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Jan 29, 2013
Company:

Hello,

How do I send a file to Google drive from 1C?
I did it in PHP and C#.
But I couldn't figure out how to do it in 1C.
Can you give a sample application?

 
#2
People who like this:0Yes/0No
Interested
Rating: 16
Joined: Dec 4, 2017
Company:

Dear Burak Uyanık,

You can take a look at Google API reference:

https://developers.google.com/drive/api/v3/reference/

https://developers.google.com/drive/api/v3/reference/files/create


And then use the API in your 1C:Enterprise language code via the HTTPConnection and HTTPRequest objects.

Best regards,
Vladimir Gurov

1C Company support team
 
#3
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Jan 29, 2013
Company:

Dear Vladimir Gurov,
Thank you.

 
#4
People who like this:0Yes/0No
Active user
Rating: 2
Joined: Jan 29, 2013
Company:

Dear Vladimir Gurov,

I've reviewed the Google API reference links.
But I couldn't figure out how to work on the 1C side.
Can you give a sample application on this issue.
I need your help.

Best regards

 
#5
People who like this:0Yes/0No
Active user
Rating: 3
Joined: Mar 10, 2017
Company: Rufinor

Dear Burak Uyanik,

You need to use HTTP services in 1C. Just construct the string of GET or POST requests according to Google API docs and send request. In response you will get JSON or XML answer from Google which you need to parse.

Below is small example

JSONString = "";
ServerAdress = "localhost";
Resource = "/api/1.0/sync/product/";
HTTP = New HTTPConnection(ServerAdress,,);

HTTPRequest = New HTTPRequest(Resource);
HTTPRequest.SetBodyFromString(JSONString,TextEncoding.UTF8,ByteOrderMarkUsage.DontUse);
Answer = HTTP.Post(HTTPRequest);
Result = Answer.GetBodyAsString("UTF-8");

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.