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
Refactor file-download code to allow AWS etc #327
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- cleaned up the My Account list of downloads, for simpler styling - changed both admin and catalog to allow observers to provide details of file availability - added support for AWS-hosted downloads (files on AWS S3) ... simply give `aws:bucketname/filename.ext` as the filename in attributes controller, with expiring links to prevent theft - added support for HTTP-hosted downloads, such as Dropbox or any other http/https URL which requires no authentication by the customer (offers no theft prevention) - moved download-by-redirect and download-by-streaming to observer class - removed COWOA pages for downloads, since tidied template no longer needs them
And fix inconsistencies in method signatures
And fixed an uninitialized variable
And fix backwards boolean condition test
👍 |
1 similar comment
👍 |
zcwilt
added a commit
that referenced
this pull request
Mar 5, 2015
Refactor file-download code to allow AWS etc
drbyte
added a commit
to drbyte/zencart
that referenced
this pull request
Mar 12, 2015
Ajeh spotted that the display of MB/bytes on the downloads page had some problems after the commits in zencart#327
drbyte
added a commit
to drbyte/zencart
that referenced
this pull request
Dec 23, 2017
Merges zencart#327 and zencart#347 - added support for AWS-hosted downloads (files on AWS S3) ... simply give `aws:bucketname/filename.ext` as the filename in attributes controller, with expiring links to prevent theft - added support for URL-based downloads, such as Dropbox or any other http/https URL which requires no authentication by the customer (NOTE: offers no theft prevention or download-count-tracking) - cleaned up the My Account list of downloads, for simpler styling - changed both admin and catalog to allow observers to provide details of file availability - moved download-by-redirect and download-by-streaming to observer class Notes: - If using with Dropbox, set the `&dl=0` to `&dl=1` on the "sharing link" that Dropbox gives you, so that the file is immediately downloaded for the customer. - If sharing from Google Drive, be sure to configure the Sharing Permissions properly, and obtain a shareable link that's got read-only access. Dev tip: - For AWS, to keep credentials out of version-control, put them into the `extra-configures` folder, and prefix the filename with `dev-` since that's in the project's `.gitignore` already.
drbyte
added a commit
to drbyte/zencart
that referenced
this pull request
Dec 23, 2017
Merges zencart#327 and zencart#347 - added support for AWS-hosted downloads (files on AWS S3) ... simply give `aws:bucketname/filename.ext` as the filename in attributes controller, with expiring links to prevent theft - added support for URL-based downloads, such as Dropbox or any other http/https URL which requires no authentication by the customer (NOTE: offers no theft prevention or download-count-tracking) - cleaned up the My Account list of downloads, for simpler styling - changed both admin and catalog to allow observers to provide details of file availability - moved download-by-redirect and download-by-streaming to observer class Notes: - If using with Dropbox, set the `&dl=0` to `&dl=1` on the "sharing link" that Dropbox gives you, so that the file is immediately downloaded for the customer. - If sharing from Google Drive, be sure to configure the Sharing Permissions properly, and obtain a shareable link that's got read-only access. Dev tip: - For AWS, to keep credentials out of version-control, put them into the `extra-configures` folder, and prefix the filename with `dev-` since that's in the project's `.gitignore` already.
drbyte
added a commit
to drbyte/zencart
that referenced
this pull request
Dec 23, 2017
Merges zencart#327 and zencart#347 - added support for AWS-hosted downloads (files on AWS S3) ... simply give `aws:bucketname/filename.ext` as the filename in attributes controller, with expiring links to prevent theft - added support for URL-based downloads, such as Dropbox or any other http/https URL which requires no authentication by the customer (NOTE: offers no theft prevention or download-count-tracking) - cleaned up the My Account list of downloads, for simpler styling - changed both admin and catalog to allow observers to provide details of file availability - moved download-by-redirect and download-by-streaming to observer class Notes: - If using with Dropbox, set the `&dl=0` to `&dl=1` on the "sharing link" that Dropbox gives you, so that the file is immediately downloaded for the customer. - If sharing from Google Drive, be sure to configure the Sharing Permissions properly, and obtain a shareable link that's got read-only access. Dev tip: - For AWS, to keep credentials out of version-control, put them into the `extra-configures` folder, and prefix the filename with `dev-` since that's in the project's `.gitignore` already.
drbyte
added a commit
to drbyte/zencart
that referenced
this pull request
Dec 23, 2017
Merges zencart#327 and zencart#347 - added support for AWS-hosted downloads (files on AWS S3) ... simply give `aws:bucketname/filename.ext` as the filename in attributes controller, with expiring links to prevent theft - added support for URL-based downloads, such as Dropbox or any other http/https URL which requires no authentication by the customer (NOTE: offers no theft prevention or download-count-tracking) - cleaned up the My Account list of downloads, for simpler styling - changed both admin and catalog to allow observers to provide details of file availability - moved download-by-redirect and download-by-streaming to observer class Notes: - If using with Dropbox, set the `&dl=0` to `&dl=1` on the "sharing link" that Dropbox gives you, so that the file is immediately downloaded for the customer. - If sharing from Google Drive, be sure to configure the Sharing Permissions properly, and obtain a shareable link that's got read-only access. Dev tip: - For AWS, to keep credentials out of version-control, put them into the `extra-configures` folder, and prefix the filename with `dev-` since that's in the project's `.gitignore` already.
drbyte
added a commit
to drbyte/zencart
that referenced
this pull request
Dec 23, 2017
Merges zencart#327 and zencart#347 - added support for AWS-hosted downloads (files on AWS S3) ... simply give `aws:bucketname/filename.ext` as the filename in attributes controller, with expiring links to prevent theft - added support for URL-based downloads, such as Dropbox or any other http/https URL which requires no authentication by the customer (NOTE: offers no theft prevention) - cleaned up the My Account list of downloads, for simpler styling - changed both admin and catalog to allow observers to provide details of file availability - moved download-by-redirect and download-by-streaming to observer class Notes: - If using with Dropbox, set the `&dl=0` to `&dl=1` on the "sharing link" that Dropbox gives you, so that the file is immediately downloaded for the customer. - If sharing from Google Drive, be sure to configure the Sharing Permissions properly, and obtain a shareable link that's got read-only access. Dev tip: - For AWS, to keep credentials out of version-control, put them into the `extra-configures` folder, and prefix the filename with `dev-` since that's in the project's `.gitignore` already.
drbyte
added a commit
to drbyte/zencart
that referenced
this pull request
Dec 23, 2017
Merges zencart#327 and zencart#347 - added support for AWS-hosted downloads (files on AWS S3) ... simply give `aws:bucketname/filename.ext:number_of_bytes` as the filename in attributes controller and download-manager - added support for URL-based downloads, such as Dropbox or any other http/https URL which requires no authentication by the customer (NOTE: offers no theft prevention) - cleaned up the My Account list of downloads, for simpler styling - changed both admin and catalog to allow observers to provide details of file availability - moved download-by-redirect and download-by-streaming to observer class Notes: - If using with Dropbox, set the `&dl=0` to `&dl=1` on the "sharing link" that Dropbox gives you, so that the file is immediately downloaded for the customer. - If sharing from Google Drive, be sure to configure the Sharing Permissions properly, and obtain a shareable link that's got read-only access. Dev tip: - For AWS, to keep credentials out of version-control, put them into the `extra-configures` folder, and prefix the filename with `dev-` since that's in the project's `.gitignore` already.
drbyte
added a commit
to drbyte/zencart
that referenced
this pull request
Dec 23, 2017
Merges zencart#327 and zencart#347 - added support for AWS-hosted downloads (files on AWS S3) ... simply give `aws:bucketname/filename.ext:number_of_bytes` as the filename in attributes controller and download-manager - added support for URL-based downloads, such as Dropbox or any other http/https URL which requires no authentication by the customer (NOTE: offers no theft prevention) - cleaned up the My Account list of downloads, for simpler styling - changed both admin and catalog to allow observers to provide details of file availability - moved download-by-redirect and download-by-streaming to observer class Notes: - If using with Dropbox, set the `&dl=0` to `&dl=1` on the "sharing link" that Dropbox gives you, so that the file is immediately downloaded for the customer. - If sharing from Google Drive, be sure to configure the Sharing Permissions properly, and obtain a shareable link that's got read-only access. Dev tip: - For AWS, to keep credentials out of version-control, put them into the `extra-configures` folder, and prefix the filename with `dev-` since that's in the project's `.gitignore` already.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
aws:bucketname/filename.ext
as the filename in attributes controller, with expiring links to prevent theftNotes: