[DEV] update the upload of cover
This commit is contained in:
parent
5e0bcc37f5
commit
b4d280039d
@ -53,11 +53,11 @@ public class SeasonResource {
|
|||||||
@Path("{id}/add_cover")
|
@Path("{id}/add_cover")
|
||||||
@Consumes({MediaType.MULTIPART_FORM_DATA})
|
@Consumes({MediaType.MULTIPART_FORM_DATA})
|
||||||
public Response uploadCover(@PathParam("id") Long id,
|
public Response uploadCover(@PathParam("id") Long id,
|
||||||
@FormDataParam("file_name") String file_name,
|
@FormDataParam("fileName") String fileName,
|
||||||
@FormDataParam("file") InputStream fileInputStream,
|
@FormDataParam("file") InputStream fileInputStream,
|
||||||
@FormDataParam("file") FormDataContentDisposition fileMetaData
|
@FormDataParam("file") FormDataContentDisposition fileMetaData
|
||||||
) {
|
) {
|
||||||
return NodeInterface.uploadCover(typeInNode, id, file_name, fileInputStream, fileMetaData);
|
return NodeInterface.uploadCover(typeInNode, id, fileName, fileInputStream, fileMetaData);
|
||||||
}
|
}
|
||||||
@GET
|
@GET
|
||||||
@Path("{id}/rm_cover/{cover_id}")
|
@Path("{id}/rm_cover/{cover_id}")
|
||||||
|
@ -53,11 +53,11 @@ public class UniverseResource {
|
|||||||
@Path("{id}/add_cover")
|
@Path("{id}/add_cover")
|
||||||
@Consumes({MediaType.MULTIPART_FORM_DATA})
|
@Consumes({MediaType.MULTIPART_FORM_DATA})
|
||||||
public Response uploadCover(@PathParam("id") Long id,
|
public Response uploadCover(@PathParam("id") Long id,
|
||||||
@FormDataParam("file_name") String file_name,
|
@FormDataParam("fileName") String fileName,
|
||||||
@FormDataParam("file") InputStream fileInputStream,
|
@FormDataParam("file") InputStream fileInputStream,
|
||||||
@FormDataParam("file") FormDataContentDisposition fileMetaData
|
@FormDataParam("file") FormDataContentDisposition fileMetaData
|
||||||
) {
|
) {
|
||||||
return NodeInterface.uploadCover(typeInNode, id, file_name, fileInputStream, fileMetaData);
|
return NodeInterface.uploadCover(typeInNode, id, fileName, fileInputStream, fileMetaData);
|
||||||
}
|
}
|
||||||
@GET
|
@GET
|
||||||
@Path("{id}/rm_cover/{cover_id}")
|
@Path("{id}/rm_cover/{cover_id}")
|
||||||
|
@ -98,7 +98,7 @@ public class UserResource {
|
|||||||
@GET
|
@GET
|
||||||
@Path("{id}")
|
@Path("{id}")
|
||||||
@RolesAllowed("USER")
|
@RolesAllowed("USER")
|
||||||
public UserExtern getUser(@Context SecurityContext sc, @PathParam("id") long userId) {
|
public UserExtern getUsers(@Context SecurityContext sc, @PathParam("id") long userId) {
|
||||||
System.out.println("getUser " + userId);
|
System.out.println("getUser " + userId);
|
||||||
GenericContext gc = (GenericContext) sc.getUserPrincipal();
|
GenericContext gc = (GenericContext) sc.getUserPrincipal();
|
||||||
System.out.println("===================================================");
|
System.out.println("===================================================");
|
||||||
|
@ -87,8 +87,8 @@ export class UniverseService {
|
|||||||
nodeId:number,
|
nodeId:number,
|
||||||
progress:any = null) {
|
progress:any = null) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('file_name', file.name);
|
formData.append('fileName', file.name);
|
||||||
formData.append('node_id', nodeId.toString());
|
formData.append('nodeId', nodeId.toString());
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
let self = this;
|
let self = this;
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
@ -118,7 +118,7 @@ export class VideoService {
|
|||||||
progress:any = null) {
|
progress:any = null) {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('fileName', file.name);
|
formData.append('fileName', file.name);
|
||||||
formData.append('typeId', mediaId.toString());
|
formData.append('id', mediaId.toString());
|
||||||
formData.append('file', file);
|
formData.append('file', file);
|
||||||
let self = this;
|
let self = this;
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user