0

I want to upload file that I am generating in my app. It looks like I can upload file if I will provide path to the file, or url where the file is, but I have only content of the file. Is there a way I can upload that content dropbox ? I am using third party php sdk

rtom
  • 585
  • 1
  • 12
  • 26
  • 1
    You are expected to try to **write the code yourself**. After [**doing more research**](https://meta.stackoverflow.com/q/261592/1011527) if you have a problem **post what you've tried** with a **clear explanation of what isn't working** and provide [a Minimal, Complete, and Verifiable example](http://stackoverflow.com/help/mcve). Read [How to Ask](http://stackoverflow.com/help/how-to-ask) a good question. Be sure to [take the tour](http://stackoverflow.com/tour) and read [this](https://meta.stackoverflow.com/q/347937/1011527). – Jay Blanchard Apr 27 '17 at 13:29
  • I haven't tried this myself, but it looks like in that library, [to upload a file you supply a `DropboxFile` object](https://github.com/kunalvarma05/dropbox-php-sdk/wiki/Upload-and-Download-Files), and you can create a `DropboxFile` object from a resource using [`DropboxFile.createByStream`](https://github.com/kunalvarma05/dropbox-php-sdk/blob/master/src/Dropbox/DropboxFile.php#L89). – Greg Apr 27 '17 at 23:46

1 Answers1

0

I solved this by creating temporary file that will be uploaded and then deleted.

rtom
  • 585
  • 1
  • 12
  • 26