Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PLAT-10892: return s3 file location or local server file path for path only requests coming from s3 supported packager #9419

Merged
merged 9 commits into from
May 21, 2020

Conversation

inbal-ben-david
Copy link
Collaborator

@inbal-ben-david inbal-ben-david commented May 17, 2020

This change is Reviewable

@inbal-ben-david inbal-ben-david changed the base branch from Propus-16.2.0 to Propus-16.3.0 May 18, 2020 12:48
@inbal-ben-david
Copy link
Collaborator Author

{
// if the entry fully exist locally return empty fileSync and path
// to make the request redirected for local serving
if(self::entryFullyExistLocally($flavorAsset->getEntryId()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

check the opposite that none exist in the $preferredStorageId

else
{
// use cloud file location
$path = self::CLOUD_S3_PREFIX . $fileSync->getFilePath();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try to get the prefix from the remote storage

* @return string
* @throws Exception
*/
public static function getPathByFileSync($fileSync)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the preferred storage ID is not local - user URL else user file.

{
$allowRemotePath = false;
if(!$local)
$file_sync = kFileSyncUtils::getFileSyncByPreferredOrder($syncKey, $flavorAsset, $preferredStorageId);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rename - no Order

@inbal-ben-david inbal-ben-david merged commit d95a49e into Propus-16.3.0 May 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants