Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Box attachment example (issue #481) #743

Merged
merged 3 commits into from
Oct 22, 2018

Conversation

semijoelon
Copy link
Contributor

Fixes

Resolves #481

Checklist

  • I have made a material change to the repo (functionality, testing, spelling, grammar)
  • I have read the [Contribution Guide] and my PR follows them.
  • I updated my branch with the master branch.
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation about the functionality in the appropriate .md file
  • I have added in line documentation to the code I modified

Short description of what this PR does:

  • Updates USE_CASES.md with an example of how to attach a file from Box to an email.

If you have questions, please send an email to Sendgrid, or file a Github Issue in this repository.

@thinkingserious thinkingserious added the status: code review request requesting a community code review or review from Twilio label Oct 17, 2018
USE_CASES.md Outdated
'sub' => $boxConfig->enterpriseID,
'box_sub_type' => 'enterprise',
'aud' => 'https://api.box.com/oauth2/token',
'jti' => bin2hex(random_bytes(16)),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to official doc, the random_bytes function supports since php-7.0 version.

And this package still supports the php-5.6 version.

I think this example code should add the notification message to notify someone this sample is only available for php-7.0+ or using other ways to be compatible with php-5.6.

Copy link
Contributor

@peter279k peter279k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this suggestion I mention should be considered and solved.

@devchas devchas added difficulty: medium fix is medium in difficulty hacktoberfest status: work in progress Twilio or the community is in the process of implementing type: docs update documentation change not affecting the code labels Oct 17, 2018
@semijoelon
Copy link
Contributor Author

Good call, @peter279k. I've updated the function to openssl_random_pseudo_bytes for compatibility.

@peter279k
Copy link
Contributor

@semijoelon, thank you for your reply.

If we use the openssl_random_pseudo_bytes function to be compatible with the php-5.6 version, I think we have to add the "ext-openssl": "*" inside require block in composer.json.

@semijoelon semijoelon force-pushed the box-file-attach branch 3 times, most recently from 58cd62d to 4fbc370 Compare October 19, 2018 02:22
@semijoelon
Copy link
Contributor Author

Thanks for the suggestion, @peter279k. I have updated composer.json as well.

Copy link
Contributor

@peter279k peter279k left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After the request changes are approved, it looks good to me.

@thinkingserious thinkingserious added status: ready for deploy code ready to be released in next deploy status: hacktoberfest approved and removed status: code review request requesting a community code review or review from Twilio status: work in progress Twilio or the community is in the process of implementing labels Oct 22, 2018
@thinkingserious thinkingserious merged commit dc9dba2 into sendgrid:master Oct 22, 2018
@thinkingserious
Copy link
Contributor

Hello @semijoelon,

Thanks again for the PR!

It's HACKTOBERFEST! We want to show our appreciation by sending you some special Hacktoberfest swag. If you have not already, could you please fill out this form so we can send it to you? Thanks!

Team SendGrid DX

@thinkingserious
Copy link
Contributor

Hello @semijoelon,

Thanks again for the PR!

We noticed that you have earned 3 out of the 5 points needed to receive glorious SendGrid Hacktoberfest swag.

Please take a moment to checkout this link to find more issues to get you past the required threshold.

Also, please be sure that you have officially registered here.

Thank you and Happy Hacktobering!

Team SendGrid DX

@thinkingserious
Copy link
Contributor

Hello @semijoelon,

Thanks again for the PR!

You have earned 3 out of the 5 points needed to receive glorious SendGrid Hacktoberfest swag.

Please take a moment to checkout this link to find more issues to get you past the required threshold or to simply continue the celebration.

Also, please be sure you have officially registered with us here by November 1, 2018 to qualify.

If you have any questions you can email us at dx+hacktoberfest2018@sendgrid.com.

Thank you and Happy Hacktobering!

Team SendGrid

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: medium fix is medium in difficulty status: ready for deploy code ready to be released in next deploy type: docs update documentation change not affecting the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Attach files to email from Box.com
4 participants