-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Open
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server.
Issue Description
I have files in json. And I put that json inside of an array. But seems like parse files are saved hardcoded. Even we change fileAdapter, or baseUrl in file adapter, files return with the old url.
Steps to reproduce
Here is an example. This is How I save my files.
for(var i = 0; i < mediaList.length; i++){
//...other logic
var mainmedia = new Parse.File(user.id, { base64: mediaData },mimeInfo.mime);
var thumbfile = new Parse.File(user.id, { base64: thumbnail },mimeInfo.mime);
var item = {"type":"image","width":ratiow,"height":ratioh,"media":mainmedia,"thumbnail":thumbfile};
itemList.push(item);
}
post.set("media",itemList);
And baseUrl in my adapter is : http://files.example.com
Now file is saved with this url: http://files.example.com/filename
But If change baseUrl to this: http://my-new-file-endpoint.example.com
I still get http://files.example.com/filename but I should get http://my-new-file-endpoint.example.com/filename
Actual Outcome
I get old url
http://files.example.com/filename
Expected Outcome
I should get http://my-new-file-endpoint.example.com/filename
Failing Test Case / Pull Request
- 🤩 I submitted a PR with a fix and a test case.
- 🧐 I submitted a PR with a failing test case. (here)
Environment
Server
- Parse Server version:
4.5//But got the same result in previous versions too - Operating system:
Ubuntu 18.04 - Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc):
Remote server
Database
- System (MongoDB or Postgres):
Mongodb - Database version:
4.4 - Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc):
remote
Metadata
Metadata
Assignees
Labels
No labels