fix write
This commit is contained in:
		@@ -78,12 +78,12 @@ async def create_upload_file(file: UploadFile | None, package: Annotated[str, Fo
 | 
			
		||||
            os.makedirs(dir_last)
 | 
			
		||||
        if not os.path.exists(dir_stable):
 | 
			
		||||
            os.makedirs(dir_stable)
 | 
			
		||||
        with open(f"{dir_file}/{filename}", 'a') as f:
 | 
			
		||||
        with open(f"{dir_file}/{filename}", 'wb+') as f:
 | 
			
		||||
            f.write(contents)
 | 
			
		||||
        with open(f"{dir_last}/{filename}", 'a') as f:
 | 
			
		||||
        with open(f"{dir_last}/{filename}", 'wb+') as f:
 | 
			
		||||
            f.write(contents)
 | 
			
		||||
        if stable:
 | 
			
		||||
            with open(f"{dir_stable}/{filename}", 'a') as f:
 | 
			
		||||
            with open(f"{dir_stable}/{filename}", 'wb+') as f:
 | 
			
		||||
                f.write(contents)
 | 
			
		||||
    except Exception as err:
 | 
			
		||||
        return {"message": "There was an error uploading the file, error {err}".format(err=err)}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user