Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > 1C - Google Drive

Forum

Search UsersRules
1C - Google Drive
#1
Active user
Points:: 0
Joined:: Jan 29, 2013

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?

Profile
#2
Interested
Points:: 0
Joined:: Dec 4, 2017

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

Profile
#3
Active user
Points:: 0
Joined:: Jan 29, 2013

Dear Vladimir Gurov,
Thank you.

Profile
#4
Active user
Points:: 0
Joined:: Jan 29, 2013

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

Profile
#5
Active user
Points:: 0
Joined:: Mar 10, 2017

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");

Profile
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.