[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")
|
||||
@Consumes({MediaType.MULTIPART_FORM_DATA})
|
||||
public Response uploadCover(@PathParam("id") Long id,
|
||||
@FormDataParam("file_name") String file_name,
|
||||
@FormDataParam("fileName") String fileName,
|
||||
@FormDataParam("file") InputStream fileInputStream,
|
||||
@FormDataParam("file") FormDataContentDisposition fileMetaData
|
||||
) {
|
||||
return NodeInterface.uploadCover(typeInNode, id, file_name, fileInputStream, fileMetaData);
|
||||
return NodeInterface.uploadCover(typeInNode, id, fileName, fileInputStream, fileMetaData);
|
||||
}
|
||||
@GET
|
||||
@Path("{id}/rm_cover/{cover_id}")
|
||||
|
@ -53,11 +53,11 @@ public class UniverseResource {
|
||||
@Path("{id}/add_cover")
|
||||
@Consumes({MediaType.MULTIPART_FORM_DATA})
|
||||
public Response uploadCover(@PathParam("id") Long id,
|
||||
@FormDataParam("file_name") String file_name,
|
||||
@FormDataParam("fileName") String fileName,
|
||||
@FormDataParam("file") InputStream fileInputStream,
|
||||
@FormDataParam("file") FormDataContentDisposition fileMetaData
|
||||
) {
|
||||
return NodeInterface.uploadCover(typeInNode, id, file_name, fileInputStream, fileMetaData);
|
||||
return NodeInterface.uploadCover(typeInNode, id, fileName, fileInputStream, fileMetaData);
|
||||
}
|
||||
@GET
|
||||
@Path("{id}/rm_cover/{cover_id}")
|
||||
|
@ -98,7 +98,7 @@ public class UserResource {
|
||||
@GET
|
||||
@Path("{id}")
|
||||
@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);
|
||||
GenericContext gc = (GenericContext) sc.getUserPrincipal();
|
||||
System.out.println("===================================================");
|
||||
|
@ -166,7 +166,7 @@ export class SeriesService {
|
||||
coverId:number) {
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self.http.getSpecific(`${this.serviceName }/${ nodeId }/rm_cover`, coverId)
|
||||
self.http.getSpecific(`${this.serviceName}/${nodeId}/rm_cover`, coverId)
|
||||
.then((response) => {
|
||||
let data = response;
|
||||
if(data === null || data === undefined) {
|
||||
@ -189,7 +189,7 @@ export class SeriesService {
|
||||
formData.append('file', file);
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
self.http.uploadMultipart(`${this.serviceName }/${ nodeId }/add_cover/`, formData, progress)
|
||||
self.http.uploadMultipart(`${this.serviceName }/${nodeId}/add_cover/`, formData, progress)
|
||||
.then((response) => {
|
||||
let data = response;
|
||||
if(data === null || data === undefined) {
|
||||
|
@ -87,8 +87,8 @@ export class UniverseService {
|
||||
nodeId:number,
|
||||
progress:any = null) {
|
||||
const formData = new FormData();
|
||||
formData.append('file_name', file.name);
|
||||
formData.append('node_id', nodeId.toString());
|
||||
formData.append('fileName', file.name);
|
||||
formData.append('nodeId', nodeId.toString());
|
||||
formData.append('file', file);
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
|
@ -118,7 +118,7 @@ export class VideoService {
|
||||
progress:any = null) {
|
||||
const formData = new FormData();
|
||||
formData.append('fileName', file.name);
|
||||
formData.append('typeId', mediaId.toString());
|
||||
formData.append('id', mediaId.toString());
|
||||
formData.append('file', file);
|
||||
let self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
|
Loading…
Reference in New Issue
Block a user