Skip to content

Loading file like resource - #17

Merged
irazasyed merged 1 commit into
irazasyed:masterfrom
rkhitin:file_resource
Aug 20, 2015
Merged

Loading file like resource#17
irazasyed merged 1 commit into
irazasyed:masterfrom
rkhitin:file_resource

Conversation

@rkhitin

@rkhitin rkhitin commented Aug 7, 2015

Copy link
Copy Markdown
Contributor

Now file can be load like resource. For example: $telegram->sendDocument($chatId, fopen($imageUrl));

@jonnywilliamson

Copy link
Copy Markdown
Contributor

What benefit does this give us?

Does it allow us to send a file that's not local? Ie

$telegram->sendDocument($chatId, fopen('http://example.com/demo.pdf'))

If so, then +1

@rkhitin

rkhitin commented Aug 20, 2015

Copy link
Copy Markdown
Contributor Author

Yes. That was the goal.

@irazasyed

Copy link
Copy Markdown
Owner

Have you tested this? @rkhitin

@rkhitin

rkhitin commented Aug 20, 2015

Copy link
Copy Markdown
Contributor Author

Of course, it's working in real project right now. And, actually, there only two lines was changed.

irazasyed added a commit that referenced this pull request Aug 20, 2015
Add support to load resource directly in uploadFile.
@irazasyed
irazasyed merged commit 91ed3a1 into irazasyed:master Aug 20, 2015
@irazasyed

Copy link
Copy Markdown
Owner

Thanks for the PR. Merged. Will tag the update soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants