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

Feature addition #1

Merged
merged 11 commits into from
Dec 23, 2016
Merged

Conversation

SridarDhandapani
Copy link
Contributor

  • Configurable folder prefix for upload.
  • Automatically set content-type for uploaded file.
  • Keep recently added file at top of the pile for easy reach.
  • Few minor operational improvements.

@@ -134,6 +134,9 @@ const handleFiles = (files) => {
* If config is present, instantiates S3Service basing on that information.
*/
mb.on('ready', () => {
const template = [{label: 'Actions', submenu: [{role: "paste"}, {role: "quit"}]}];
const menu = Menu.buildFromTemplate(template);

Choose a reason for hiding this comment

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

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

@@ -134,6 +134,9 @@ const handleFiles = (files) => {
* If config is present, instantiates S3Service basing on that information.
*/
mb.on('ready', () => {
const template = [{label: 'Actions', submenu: [{role: "paste"}, {role: "quit"}]}];

Choose a reason for hiding this comment

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

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

@@ -2,7 +2,7 @@ const menubar = require('menubar');
const fs = require('fs');
const path = require('path');
const notifier = require('node-notifier');
const { ipcMain, clipboard } = require('electron');
const { ipcMain, clipboard, Menu } = require('electron');

Choose a reason for hiding this comment

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

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).
'destructuring binding' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

@@ -52,11 +53,13 @@ class S3Service {
*/
uploadFile(fileName, data) {
const uploadEventEmitter = new EventEmitter();
const mimeType = fileType(data);

Choose a reason for hiding this comment

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

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

Copy link
Owner

Choose a reason for hiding this comment

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

Bad Indentation

@@ -1,5 +1,6 @@
const AWS = require('aws-sdk');
const EventEmitter = require('events');
const fileType = require('file-type');

Choose a reason for hiding this comment

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

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

@@ -3,7 +3,7 @@ const fs = require('fs');
* Default file path where credentials will be stored.
* @type {string}
*/
const configFilePath = './.awscredentials.json';
const configFilePath = __dirname + '/.awscredentials.json';

Choose a reason for hiding this comment

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

'const' is available in ES6 (use 'esversion: 6') or Mozilla JS extensions (use moz).

"menubar": "^4.1.2",
"node-notifier": "^4.6.0",
"react": "^15.2.0",
"react-dom": "^15.2.0",
"request": "^2.72.0"
"request": "^2.72.0",
"file-type": "^3.9.0"
Copy link
Owner

Choose a reason for hiding this comment

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

Bad indentation

@@ -18,10 +18,10 @@
"Amazon Web Services",
"React"
],
"author": "Rafal Wilinski",
"author": "Sridar Dhandapani",
Copy link
Owner

Choose a reason for hiding this comment

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

???


this.s3.upload({
Body: data,
ContentType: mimeType.mime,
Copy link
Owner

Choose a reason for hiding this comment

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

Same here

Copy link
Owner

@RafalWilinski RafalWilinski left a comment

Choose a reason for hiding this comment

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

Please do not alter author section of package.json and adapt proper coding style.

@SridarDhandapani
Copy link
Contributor Author

SridarDhandapani commented Dec 22, 2016 via email

@RafalWilinski
Copy link
Owner

I'm using 2 spaces.

When it comes to cherry picking I'd rather like to merge whole PR.

@RafalWilinski
Copy link
Owner

Sorry, mistakenly closed.

Copy link
Owner

@RafalWilinski RafalWilinski left a comment

Choose a reason for hiding this comment

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

👍

@RafalWilinski RafalWilinski merged commit a0d81fe into RafalWilinski:master Dec 23, 2016
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