Skip to content

[v6] FlyDrive upload problem #4672

Closed Answered by ekimkael
ekimkael asked this question in Help
Discussion options

You must be logged in to vote

I found the solution and below are the explanations:

      await Promise.all(
        payload.photos.map(async (item) => {
          const driver = env.get('DRIVE_DISK') as any
          const source = `${item.tmpPath}.${item.extname}`
          const file = source.split('/').at(-1)
          const destination = `photos/${file}`

          /**
           * you just have to pass the temporary path
           * files in the temporary folder have no extension, because:
           *
           * 1. Security: Temporary files are typically created without extensions to prevent
           *    accidental or malicious execution based on file type.
           *
           * 2. Uniqueness: Temporar…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ekimkael
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
1 participant