RocketChat / RocketChat/Rocket.Chat
Google Cloud Storage Expiration Field not available.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
I am using the Google Cloud Storage option and was looking to set the Expiration field manually. Unfortunately, the setting doesn't seem to be an option. I decided to check out the code to see if it's set hardcoded and maybe just change it manually and put in this ticket. However, I've discovered that it IS being set, but using the Expiration date used in "FileUpload_S3_URLExpiryTimeSpan" in the code below.
const accessId = RocketChat.settings.get('FileUpload_GoogleStorage_AccessId');
const secret = RocketChat.settings.get('FileUpload_GoogleStorage_Secret');
const URLExpiryTimeSpan = RocketChat.settings.get('FileUpload_S3_URLExpiryTimeSpan');
The good news is I can set it without modifying the source code. The bad news is it's not correct.
Server Setup Information:
- Version of Rocket.Chat Server: 0.61.0
- Operating System: Linux
- Deployment Method(snap/docker/tar/etc): Docker
- Number of Running Instances: 1
- DB Replicaset Oplog: Disabled
- Node Version: v8.9.3
Steps to Reproduce:
- Go to the Administrator page
- Click the "File Upload" option
- Expand the "Google Cloud Storage" accordion section
- Look for the Expiration field, it doesn't expect
- Go look in the code above, you'll notice that it references "FileUpload_S3_URLExpiryTimeSpan"
- Do a search in the GitHub repository and you'll notice that this is used and set in the Amazon S3 accordion section for the File Upload section.
Expected behavior:
There needs to be a specific Expiration field for the Google Cloud Engine
Actual behavior:
You have to go to the singular field in the Amazon S3 section and set it for the Google Cloud Engine. In addition, there is really no way to know you can do that without going to the source code.
Relevant logs:
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with packages/rocketchat-file-upload/server/config/GoogleStorage.js and the Administrator File Upload settings described in the issue. Trace how FileUpload_S3_URLExpiryTimeSpan is used for Google Cloud Storage, then identify the existing Google Cloud Storage configuration entry points. Done means Google Cloud Storage has its own visible expiration setting and uses it independently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- google-cloud, javascript
- Domain
- backend, cloud
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100