Modifying backend so it send the full entry of a file upload
This commit is contained in:
		
							
								
								
									
										11
									
								
								frontend/src/rest/uploads.js
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								frontend/src/rest/uploads.js
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,11 @@ | ||||
| import { restPostFile } from '@/rest/restConsumer.js' | ||||
|  | ||||
|  | ||||
| /** | ||||
|  * Upload a file to the server and return the url of this image | ||||
|  */ | ||||
| export async function uploadProfilePicture(file){ | ||||
| 	const formData = new FormData(); | ||||
| 	formData.append("file", file[0]); | ||||
| 	return restPostFile("/upload/ProfilePicture", formData) | ||||
| } | ||||
		Reference in New Issue
	
	Block a user