GithubHelp home page GithubHelp logo

Comments (5)

robksawyer avatar robksawyer commented on June 15, 2024 3

For anyone that came here looking for an example of how to use the original file name with this plugin, check out https://gist.github.com/robksawyer/6060412c3f86ddbc68b29ed09eef75c3.

from keystone-storage-adapter-s3.

internetErik avatar internetErik commented on June 15, 2024 2

Just wanted to note that I was having difficulty in s3 with files that have spaces in them, so when I want to keep the original file name I use this:

generateFilename: file => file.originalname.replace(/ /g, '-'),

I'll also mention this for anyone who wants to generate a public url that is saved. I usually use a method that looks like this:

publicUrl : file => `https:${process.env.S3_BASE_URL}${s3FilePath}${file.filename}`,

The S3_BASE_URL is saved in the .env file. Instead you may have a cloudfront path or whatever else you want.

from keystone-storage-adapter-s3.

mhoffmeyerDC avatar mhoffmeyerDC commented on June 15, 2024

Looking at the forks it seems like @GwonHyeok already found a fix for the issue.

Looks like a better, more robust solution rather than more options.

from keystone-storage-adapter-s3.

mhoffmeyerDC avatar mhoffmeyerDC commented on June 15, 2024

CC: @JedWatson

from keystone-storage-adapter-s3.

n-devr avatar n-devr commented on June 15, 2024

@robksawyer thank you - that worked a treat 🎉

from keystone-storage-adapter-s3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.