Skip to content
This repository was archived by the owner on Nov 24, 2018. It is now read-only.

feat: upload API #148

Closed
wants to merge 2 commits into from
Closed

Conversation

criticalbh
Copy link
Contributor

@criticalbh criticalbh commented Aug 2, 2017

Closes #100

@criticalbh criticalbh changed the title Feat/upload feat: upload API Aug 2, 2017
@@ -3,6 +3,7 @@ import ChromeRemote from './chrome/remote'
import Queue from './queue'
import { ChromelessOptions, Cookie, CookieQuery, PdfOptions } from './types'
import { getDebugOption } from './util'
import {isArray} from "util";
Copy link
Owner

Choose a reason for hiding this comment

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

Please use single quotes & no semicolon

Copy link
Owner

Choose a reason for hiding this comment

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

  • white space around braces

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry... auto import :/

@@ -31,6 +31,7 @@ import {
mousedown,
mouseup,
focus,
upload
Copy link
Owner

Choose a reason for hiding this comment

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

Please add a trailing slash

@@ -274,6 +275,14 @@ export default class Chromeless<T extends any> implements Promise<T> {
return this
}

upload(selector: string, files: string[] | string): Chromeless<T> {
Copy link
Owner

Choose a reason for hiding this comment

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

I think the name upload is a bit misleading since all this is doing is selecting files in a file input. Maybe rather use selectFile instead?

@schickling
Copy link
Owner

I think the name upload is a bit misleading since all this is doing is selecting files in a file input. Maybe rather use selectFile instead?

Open for discussion!

@criticalbh
Copy link
Contributor Author

Hello @schickling, selectFile and selectFiles ?

@adieuadieu adieuadieu added this to the v1.2 milestone Aug 3, 2017
@criticalbh
Copy link
Contributor Author

closing this one due to #170

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants