fix(backend): save data exports as data-export.zip
change the random base 64 to a directory rather than part of the filename, so that users downloading their exports aren't greeted with a completely incomprehensible file in their downloads folder
This commit is contained in:
		
							parent
							
								
									96725cc304
								
							
						
					
					
						commit
						661c3eab0f
					
				
					 3 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -58,7 +58,7 @@ public class ExportsController(
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    private string ExportUrl(Snowflake userId, string filename) =>
 | 
			
		||||
        $"{config.MediaBaseUrl}/data-exports/{userId}/{filename}.zip";
 | 
			
		||||
        $"{config.MediaBaseUrl}/data-exports/{userId}/{filename}/data-export.zip";
 | 
			
		||||
 | 
			
		||||
    [HttpPost]
 | 
			
		||||
    public async Task<IActionResult> QueueDataExportAsync()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -220,5 +220,5 @@ public class CreateDataExportInvocable(
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    private static string ExportPath(Snowflake userId, string b64) =>
 | 
			
		||||
        $"data-exports/{userId}/{b64}.zip";
 | 
			
		||||
        $"data-exports/{userId}/{b64}/data-export.zip";
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -128,5 +128,5 @@ public class DataCleanupService(
 | 
			
		|||
    }
 | 
			
		||||
 | 
			
		||||
    private static string ExportPath(Snowflake userId, string b64) =>
 | 
			
		||||
        $"data-exports/{userId}/{b64}.zip";
 | 
			
		||||
        $"data-exports/{userId}/{b64}/data-export.zip";
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue