S3 File Adapter Base url - Can it take function?

GenerateKey can take a function like this

generateKey: (filename) => {
                        return `${Date.now()}_${filename}`; // unique prefix for every filename
                    }

İ want to change baseUrl depending on filename. Can baseUrl field take function?

İf yes, how can I do that?

It is not possible in the current implementation. You can fork it and create your own adapter though. It is not that hard: https://github.com/parse-community/parse-server-s3-adapter/blob/master/index.js

1 Like

Hey. İ looked at the code. İ believe i have to edit getFileLocation function right?

İ don’t have any javascript experience. That’s why I’m asking. İ don’t know where to start

Yes. I believe that would be the right place.