# File Upload component

**URL:** <https://forum.inductiveautomation.com/t/file-upload-component/59117>\
**Category:** General Discussion\
**Created:** [May 2, 2022, 1:24pm UTC](https://forum.inductiveautomation.com/t/file-upload-component/59117 "2022-05-02T13:24:24Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mary\_Zheng](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Mary\_Zheng](https://forum.inductiveautomation.com/u/Mary_Zheng)\
**Post date:** [May 2, 2022, 1:24pm UTC](https://forum.inductiveautomation.com/t/file-upload-component/59117/1 "2022-05-02T13:24:24Z")

</div>

I would like to use a file upload component to upload a file to google driver directly rather than gateway.  
may I know it is possible to do that ?

---

<div class="post-metadata">

**Author:** ![calimero100582](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/calimero100582/32/18630_2.png) [@calimero100582](https://forum.inductiveautomation.com/u/calimero100582)\
**Post date:** [May 2, 2022, 1:33pm UTC](https://forum.inductiveautomation.com/t/file-upload-component/59117/2 "2022-05-02T13:33:26Z")

</div>

in theory you can

In the event onFileReceived, use the method event.file.getBytes()

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/d/3d73f5d14053e925891f3da0fa403c4a838df2d3.png)

Then sending it to google drive, but you will need to check the authentication process: [Upload file data &nbsp;|&nbsp; Drive API &nbsp;|&nbsp; Google Developers](https://developers.google.com/drive/api/guides/manage-uploads#http)

---

<div class="post-metadata">

**Author:** ![Mary\_Zheng](https://avatars.discourse-cdn.com/v4/letter/m/ce7236/32.png) [@Mary\_Zheng](https://forum.inductiveautomation.com/u/Mary_Zheng)\
**Post date:** [May 2, 2022, 4:55pm UTC](https://forum.inductiveautomation.com/t/file-upload-component/59117/3 "2022-05-02T16:55:00Z")

</div>

Hi Calimero,

Thank you for replying . But I am bothered by the authentication processes, if works on pure python environment , I could pip install pyDrive , but ignition can’t support pip, so I am not sure how to set up the authentication in Ignition. very frustrating …

---

<div class="post-metadata">

**Author:** ![calimero100582](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/calimero100582/32/18630_2.png) [@calimero100582](https://forum.inductiveautomation.com/u/calimero100582)\
**Post date:** [May 2, 2022, 6:31pm UTC](https://forum.inductiveautomation.com/t/file-upload-component/59117/4 "2022-05-02T18:31:11Z")

</div>

I would use HTTP process and not pyDrive, or Python implementation (not sure how well it will go)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/c/ec78a215d4d06f4bef867e67c43073fc703c4bce.png)

Best bet would be to create a service account, generate a token when needed, call google drive api

> **[Using OAuth 2.0 for Server to Server Applications  |  Google...](https://developers.google.com/identity/protocols/oauth2/service-account#overview)**
