mirror of
https://github.com/denoland/deno.git
synced 2025-01-03 04:48:52 -05:00
Rename file.ts to dom_file.ts (#1423)
This commit is contained in:
parent
5e518b7417
commit
3d9f46a6cf
3 changed files with 5 additions and 8 deletions
2
BUILD.gn
2
BUILD.gn
|
@ -61,7 +61,7 @@ ts_sources = [
|
||||||
"js/dom_types.ts",
|
"js/dom_types.ts",
|
||||||
"js/errors.ts",
|
"js/errors.ts",
|
||||||
"js/fetch.ts",
|
"js/fetch.ts",
|
||||||
"js/file.ts",
|
"js/dom_file.ts",
|
||||||
"js/file_info.ts",
|
"js/file_info.ts",
|
||||||
"js/files.ts",
|
"js/files.ts",
|
||||||
"js/flatbuffers.ts",
|
"js/flatbuffers.ts",
|
||||||
|
|
|
@ -1,7 +1,4 @@
|
||||||
// Copyright 2018 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018 the Deno authors. All rights reserved. MIT license.
|
||||||
// TODO Rename this file to js/dom_file.ts it's currently too similarly named to
|
|
||||||
// js/files.ts
|
|
||||||
|
|
||||||
import * as domTypes from "./dom_types";
|
import * as domTypes from "./dom_types";
|
||||||
import * as blob from "./blob";
|
import * as blob from "./blob";
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
// Copyright 2018 the Deno authors. All rights reserved. MIT license.
|
// Copyright 2018 the Deno authors. All rights reserved. MIT license.
|
||||||
import * as domTypes from "./dom_types";
|
import * as domTypes from "./dom_types";
|
||||||
import * as blob from "./blob";
|
import * as blob from "./blob";
|
||||||
import * as file from "./file";
|
import * as domFile from "./dom_file";
|
||||||
import { DomIterableMixin } from "./mixins/dom_iterable";
|
import { DomIterableMixin } from "./mixins/dom_iterable";
|
||||||
import { requiredArguments } from "./util";
|
import { requiredArguments } from "./util";
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ class FormDataBase {
|
||||||
requiredArguments("FormData.append", arguments.length, 2);
|
requiredArguments("FormData.append", arguments.length, 2);
|
||||||
name = String(name);
|
name = String(name);
|
||||||
if (value instanceof blob.DenoBlob) {
|
if (value instanceof blob.DenoBlob) {
|
||||||
const dfile = new file.DenoFile([value], filename || name);
|
const dfile = new domFile.DenoFile([value], filename || name);
|
||||||
this[dataSymbol].push([name, dfile]);
|
this[dataSymbol].push([name, dfile]);
|
||||||
} else {
|
} else {
|
||||||
this[dataSymbol].push([name, String(value)]);
|
this[dataSymbol].push([name, String(value)]);
|
||||||
|
@ -112,7 +112,7 @@ class FormDataBase {
|
||||||
if (this[dataSymbol][i][0] === name) {
|
if (this[dataSymbol][i][0] === name) {
|
||||||
if (!found) {
|
if (!found) {
|
||||||
if (value instanceof blob.DenoBlob) {
|
if (value instanceof blob.DenoBlob) {
|
||||||
const dfile = new file.DenoFile([value], filename || name);
|
const dfile = new domFile.DenoFile([value], filename || name);
|
||||||
this[dataSymbol][i][1] = dfile;
|
this[dataSymbol][i][1] = dfile;
|
||||||
} else {
|
} else {
|
||||||
this[dataSymbol][i][1] = String(value);
|
this[dataSymbol][i][1] = String(value);
|
||||||
|
@ -129,7 +129,7 @@ class FormDataBase {
|
||||||
// Otherwise, append entry to the context object’s entry list.
|
// Otherwise, append entry to the context object’s entry list.
|
||||||
if (!found) {
|
if (!found) {
|
||||||
if (value instanceof blob.DenoBlob) {
|
if (value instanceof blob.DenoBlob) {
|
||||||
const dfile = new file.DenoFile([value], filename || name);
|
const dfile = new domFile.DenoFile([value], filename || name);
|
||||||
this[dataSymbol].push([name, dfile]);
|
this[dataSymbol].push([name, dfile]);
|
||||||
} else {
|
} else {
|
||||||
this[dataSymbol].push([name, String(value)]);
|
this[dataSymbol].push([name, String(value)]);
|
||||||
|
|
Loading…
Reference in a new issue