如何使用PHP将图像保存到谷歌驱动器

时间:2017-11-01 07:14:18

标签: php

我想使用核心php在按钮点击上保存谷歌驱动器上的图像。我什么都不知道。有一些API的例子,但我不知道API和所有。所以请给我从最初描述的链接或解决方案。谢谢

1 个答案:

答案 0 :(得分:0)

你可以使用DROPzone&然后connecto到谷歌

imagesDropzoneInstance = new Dropzone '#imagesDropzone',
  url: 'https://www.googleapis.com/upload/drive/v2/files?uploadType=media'
  method: 'post'
  maxFileSize: 5
  paramName: 'images-dropzone-input'
  headers:
    'Authorization': "Bearer #{ uploadBundle.accessToken }"
  addRemoveLinks: 'dictRemoveFile'

imagesDropzoneInstance.uploadFiles = (files) ->
  uploadFiles: (files) ->

    .. copy the uploadFiles method of Dropzone, modify, then paste here..

    # Add the end:
    xhr.send files[0] # This overrides the default upload behavior.

但我个人最喜欢的是CLoudinary