Removed encoding from the File type.
It was missleading, as the encoding was only for the upload stream, not the file contents when stored.
This commit is contained in:
parent
af6c8d9b84
commit
4d258cf0d5
@ -39,9 +39,9 @@ const storeDB = file =>
|
||||
.write()
|
||||
|
||||
const processUpload = async upload => {
|
||||
const { stream, filename, mimetype, encoding } = await upload
|
||||
const { stream, filename, mimetype } = await upload
|
||||
const { id, path } = await storeFS({ stream, filename })
|
||||
return storeDB({ id, filename, mimetype, encoding, path })
|
||||
return storeDB({ id, filename, mimetype, path })
|
||||
}
|
||||
|
||||
export default {
|
||||
|
||||
@ -4,7 +4,6 @@ export default /* GraphQL */ `
|
||||
path: String!
|
||||
filename: String!
|
||||
mimetype: String!
|
||||
encoding: String!
|
||||
}
|
||||
|
||||
type Query {
|
||||
|
||||
@ -67,7 +67,6 @@ export default graphql(gql`
|
||||
singleUpload(file: $file) {
|
||||
id
|
||||
filename
|
||||
encoding
|
||||
mimetype
|
||||
path
|
||||
}
|
||||
|
||||
@ -32,7 +32,6 @@ export default graphql(gql`
|
||||
singleUpload(file: $file) {
|
||||
id
|
||||
filename
|
||||
encoding
|
||||
mimetype
|
||||
path
|
||||
}
|
||||
|
||||
@ -27,7 +27,6 @@ export default graphql(gql`
|
||||
multipleUpload(files: $files) {
|
||||
id
|
||||
filename
|
||||
encoding
|
||||
mimetype
|
||||
path
|
||||
}
|
||||
|
||||
@ -8,15 +8,13 @@ const Uploads = ({ data: { uploads = [] } }) => (
|
||||
<tr>
|
||||
<Head>Filename</Head>
|
||||
<Head>MIME type</Head>
|
||||
<Head>Encoding</Head>
|
||||
<Head>Path</Head>
|
||||
</tr>
|
||||
}
|
||||
tbody={uploads.map(({ id, filename, mimetype, encoding, path }) => (
|
||||
tbody={uploads.map(({ id, filename, mimetype, path }) => (
|
||||
<tr key={id}>
|
||||
<Cell>{filename}</Cell>
|
||||
<Cell>{mimetype}</Cell>
|
||||
<Cell>{encoding}</Cell>
|
||||
<Cell>{path}</Cell>
|
||||
</tr>
|
||||
))}
|
||||
|
||||
@ -5,7 +5,6 @@ export default gql`
|
||||
uploads {
|
||||
id
|
||||
filename
|
||||
encoding
|
||||
mimetype
|
||||
path
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user