Skip to content

Conversation

@khoran
Copy link

@khoran khoran commented May 30, 2024

Here is a possible fix the issue I described here.

In the hook_file_before_save function, it checks to see if a local file exists by seeing if file_url is set or not. If it's not set, and it's a new file, then it just does nothing. But this lets the file be saved without any content, allowing a name to be set. Then in the upload function, if the name is not set, it will call save. This no longer results in recursion as the hook will not call the upload function now.

I did a bit of testing, but I imagine you have more tests you can run? I know it's kind of a central component being changed. It does allow my problem test case to work though.

@khoran
Copy link
Author

khoran commented Jun 19, 2024

just fixed a typo in the first commit of this pull request that broke things. Somehow "s3" got changed to "s4".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant