RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
39.62k stars 10.15k forks source link

Google Cloud Storage Expiration Field not available. #9618

Open kellis5137 opened 6 years ago

kellis5137 commented 6 years ago

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');

https://github.com/RocketChat/Rocket.Chat/blob/217073f4c010e8472a7521c998e89fd47c7a68ee/packages/rocketchat-file-upload/server/config/GoogleStorage.js

The good news is I can set it without modifying the source code. The bad news is it's not correct.

Server Setup Information:

Steps to Reproduce:

  1. Go to the Administrator page
  2. Click the "File Upload" option
  3. Expand the "Google Cloud Storage" accordion section
  4. Look for the Expiration field, it doesn't expect
  5. Go look in the code above, you'll notice that it references "FileUpload_S3_URLExpiryTimeSpan"
  6. 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

hugocostadev commented 1 year ago

Still happening ... We should create a particular setting field for Google Cloud Storage


Questions? Help needed? Feature Requests?