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

Support for non standard ports #473

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ Evaporate is a JS library for uploading files from a browser to
AWS S3, using parallel S3's multipart uploads with MD5 checksum support
and control over pausing / resuming the upload.

## This branch allows to use Custom port for S3 endpoint

Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we get rid of this comment? If merged, it seems unnecessary

[![Build Status](https://travis-ci.org/bikeath1337/EvaporateJS.svg?branch=master)](https://travis-ci.org/bikeath1337/EvaporateJS)
[![Code Climate](https://codeclimate.com/github/TTLabs/EvaporateJS/badges/gpa.svg)](https://codeclimate.com/github/TTLabs/EvaporateJS)

Expand Down
12 changes: 11 additions & 1 deletion evaporate.js
Original file line number Diff line number Diff line change
Expand Up @@ -1016,7 +1016,17 @@
this.started = defer();

this.awsUrl = awsUrl(this.con);
this.awsHost = uri(this.awsUrl).host;

this.awsHost = uri(this.awsUrl).hostname;
/*
* ShreeDee : for compatibility with S3 clones, that are hosted on a non std port. Add the port number
*/
const port = uri(this.awsUrl).port;

if (!!port && 80 != port && 443 != port) {
this.awsHost += (':' + port );
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

If you could align the tabs/padding that would be great.



var r = extend({}, request);
if (fileUpload.contentType) {
Expand Down