instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.41k stars 2.42k forks source link

Fix for S3 Environment Error in Canvas-LMS Submission Reupload #2288

Open imsujinpark opened 7 months ago

imsujinpark commented 7 months ago

I recently encountered an issue (referenced here) related to the state "attached_temporary" in Canvas-LMS when reuploading submission zip files. The problem arises from the if statement unless @attachment.state == :unattached, causing errors during the reupload process in an S3 environment.

To address this, I've added attached_temporary state into the if statement. With this adjustment, the code will no longer impede the reuploading of submission zip files in S3 environments, preventing errors specifically when "create_success" is encountered after uploading.

CLAassistant commented 7 months ago

CLA assistant check
All committers have signed the CLA.