mirror of
				https://codeberg.org/tom79/Fedilab.git
				synced 2025-10-20 11:20:16 +03:00 
			
		
		
		
	Fix saving media
This commit is contained in:
		
							parent
							
								
									aa4aefe9dc
								
							
						
					
					
						commit
						90ed830b33
					
				
					 1 changed files with 4 additions and 3 deletions
				
			
		|  | @ -143,10 +143,11 @@ public class MediaHelper { | |||
|                     public void onResourceReady(@NotNull File file, Transition<? super File> transition) { | ||||
|                         final String fileName = URLUtil.guessFileName(url, null, null); | ||||
| 
 | ||||
| 
 | ||||
|                         File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES); | ||||
|                         final String targeted_folder = path + "/" + context.getString(R.string.app_name); | ||||
|                         if (!new File(targeted_folder).exists()) { | ||||
|                             new File(targeted_folder).mkdir(); | ||||
|                         File targeted_folder = new File(path, context.getString(R.string.app_name)); | ||||
|                         if (!targeted_folder.exists()) { | ||||
|                             targeted_folder.mkdir(); | ||||
|                         } | ||||
|                         FileInputStream fis = null; | ||||
|                         FileOutputStream fos = null; | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue