remove unused important and fix extension bug
This commit is contained in:
parent
f47bdaa8f5
commit
3e84622e51
|
@ -108,7 +108,6 @@ export function ObjectStore(
|
|||
* Given an object store and a bucket name this will make sure the bucket exists,
|
||||
* if it does not exist then it will create it.
|
||||
*/
|
||||
|
||||
export async function makeSureBucketExists(client: any, bucketName: string) {
|
||||
bucketName = sanitizeBucket(bucketName)
|
||||
try {
|
||||
|
|
|
@ -21,8 +21,6 @@ import { performance } from "perf_hooks"
|
|||
import FormData from "form-data"
|
||||
import { URLSearchParams } from "url"
|
||||
import { blacklist, context, objectStore } from "@budibase/backend-core"
|
||||
const multipart = require("parse-multipart-data")
|
||||
import path from "path"
|
||||
import { v4 } from "uuid"
|
||||
const BodyTypes = {
|
||||
NONE: "none",
|
||||
|
@ -142,7 +140,9 @@ class RestIntegration implements IntegrationBase {
|
|||
try {
|
||||
if (filename) {
|
||||
const responseBuffer = await response.arrayBuffer()
|
||||
fileExtension = path.extname(filename).slice(1)
|
||||
const fileExtension = filename.includes(".")
|
||||
? filename.split(".").slice(1).join(".")
|
||||
: ""
|
||||
|
||||
const processedFileName = `${v4()}.${fileExtension}`
|
||||
const key = `${context.getProdAppId()}/attachments/${processedFileName}`
|
||||
|
|
Loading…
Reference in New Issue