forked from CaramelFur/Picsur
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9bf2dfd
commit 2f4c74b
Showing
18 changed files
with
343 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { MultiPartRequest } from './multi-part-request.dto'; | ||
|
||
export class ImagesUploadRequest implements MultiPartRequest { | ||
constructor(private images: File[]) {} | ||
|
||
public createFormData(): FormData { | ||
const data = new FormData(); | ||
for (let i = 0; i < this.images.length; i++) { | ||
data.append(`images[${i}]`, this.images[i]); | ||
} | ||
return data; | ||
} | ||
} |
Oops, something went wrong.