Repository navigation
Conversation
4b05dcf to
6e91ae6
Compare
|
I found another place where the code blindly tests the URL without considering payload/packages/payload/src/uploads/getExternalFile.ts Lines 19 to 24 in 19fcf99 If Not sure if this should be addressed in this PR. |
|
I thought this was all handled by #14869. @JarrodMFlesch can you verify if this is still an issue or we can close it? |
|
It was actually fully resolved in a later PR #14967 I can check if this is still an issue though. |
6e91ae6 to
07d5838
Compare
|
Since this was closed by #15089 I am guessing we can close it. Can you please confirm @jefferyto? |
|
I retested #14945 with v3.71.1 and the issue was fixed - thanks. |
What?
Fixes
generateFileDatausinggetExternalFile(external fetch) instead ofgetFileByPath(local file read) when getting file details/content for a Payload upload file whenserverURLis set.Why?
Currently,
generateFileDatachecks if the file URL starts with a "/" to decide if the file is a file uploaded to Payload. The file URL will start with "/" whenserverURLis not set. WhenserverURLis set the file URL starts with theserverURLvalue instead of "/", and sogenerateFileDatatreats the file as an external file.How?
Instead of checking if the file URL starts with "/", compare the file URL to what a Payload file URL would be for the given filename.
Fixes #14945