Skip to content

Conversation

@Pytal
Copy link
Member

@Pytal Pytal commented Jun 10, 2022

Amendment to #32675 as per #32791 (review)

This has been cherry-picked onto the existing backports of #32675

@Pytal Pytal added 3. to review Waiting for reviews feature: dashboard labels Jun 10, 2022
@Pytal Pytal added this to the Nextcloud 25 milestone Jun 10, 2022
@Pytal Pytal requested review from a team and PVince81 June 10, 2022 19:59
@Pytal Pytal self-assigned this Jun 10, 2022
@Pytal Pytal requested review from come-nc and icewind1991 and removed request for a team June 10, 2022 19:59
throw new InvalidArgumentException('Invalid image file');
}
$this->getAppDataFolder()->newFile('background.jpg', $file->fopen('r'));
rewind($stream);
Copy link
Member

Choose a reason for hiding this comment

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

this needs to be tested with object store, rewind might not work on all stream types (not sure if a http stream can be rewinded)

now thinking again, I see that this endpoint is only for setting a background image, something that will not happen repeatedly, so having a little performance impact here for validation is probably ok

feel free to revert back to the former solution and sorry for the noise

@Pytal
Copy link
Member Author

Pytal commented Jun 27, 2022

Closing as per #32817 (comment)

@Pytal Pytal closed this Jun 27, 2022
@Pytal
Copy link
Member Author

Pytal commented Jun 27, 2022

@Pytal Pytal deleted the fix/32675/fopen branch February 24, 2023 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants