JDeveloper를 사용하고 있습니다. ADF Fusion Web Application에는 Input File 컨트롤과 Bean 메소드를 호출하여 UCM에 파일을 업로드하는 Send 버튼이 있습니다. 내 파일이 내 컴퓨터에있는 경우 "/home/user/myfile.txt"라고 말하면 매력적입니다. 입력 파일을 사용하려는 경우이 파일을 디스크에 저장하고이 파일을 업로드하지 않고 UCM에 파일을 업로드하는 방법을 알 수 없습니다. 제 생각에는 이런 일을하는 것이 권장되지 않습니다. 당신이 어떤 제안이있는 경우RIDC를 사용하여 ADF 입력 파일을 UCM 폴더에 업로드
// RETRIEVE THE DESTINATION PATH
DataBinder binder = idcClient.createBinder();
binder.putLocal("IdcService", "COLLECTION_INFO");
binder.putLocal("hasCollectionPath", "true");
binder.putLocal("dCollectionPath", "/Contribution Folders/PDD"); // The path you are looking for
DataBinder searchFolder = idcClient.sendRequest(idcContext, binder).getResponseAsBinder();
binder = idcClient.createBinder();
binder.putLocal ("IdcService", "CHECKIN_NEW");
binder.putLocal ("dDocAuthor", "weblogic");
binder.putLocal ("dDocTitle", "myimage2.jpg");
binder.putLocal ("dDocName", "myimage2.jpg");
binder.putLocal ("dDocType", "Document");
binder.putLocal("xCollectionID", searchFolder.getLocal("dCollectionID"));
binder.putLocal ("dSecurityGroup", "Public");
binder.putLocal ("dDocAccount:", "");
binder.putLocal ("xComments", "My comment");
binder.addFile ("primaryFile", new File("/home/oracle/myimage.jpg"));
// check in the file
ServiceResponse response = idcClient.sendRequest (idcContext, binder);
, 나는 많은 감사하겠습니다 : 여기
서버 워크 스테이션에서 오는 파일을 업로드 할 수 있습니다 내가 지금까지 가지고있는 코드입니다. 감사합니다. 이미 스스로 해결책을 발견했습니다 그래서 그냥 여기 사용해야 다른 편리한을 UploadFile 방법이 있다는 것을 언급 할 UploadedFile uf = (UploadedFile) inputFile1.getValue();
DataBinder binder = idcClient.createBinder();
binder.putLocal ("IdcService", "CHECKIN_NEW");
binder.putLocal ("dDocAuthor", "weblogic"); // if user is admin, can specify other user
binder.putLocal ("dDocTitle", uf.getFilename());
binder.putLocal ("dDocName", uf.getFilename());
binder.putLocal ("dDocType", "DigitalMedia");
binder.putLocal("xCollectionID", getFolderCollectionId("/Contribution Folders/PDD")); // parent's folder
binder.putLocal ("dSecurityGroup", "Public");
binder.putLocal ("dDocAccount:", "");
binder.putLocal ("xComments", "Montreal comment");
binder.putLocal ("xWCTags", "Montreal");
binder.addFile ("primaryFile", new TransferFile(uf.getInputStream(), uf.getFilename(), getByteLenght(uf.getInputStream())));
ServiceResponse response = idcClient.sendRequest (idcContext, binder);
컴퓨터에 저장되어있는 파일은 어디에 저장 되나요? – User404
InputFile 컨트롤을 사용하고 사용자가 파일을 탐색 할 때 InputStream 컨트롤이 제공됩니다. 내가 원했던 것은 서버에 파일을 저장하지 않아도 UCM에이 입력 스트림을 보내는 방식으로 나에게 나쁜 습관으로 보입니다. – Benster
UCM Api는 File 객체 만 받아들이 기 때문에 유일한 가능한 방법은 inputstream을 File로 변환하는 것입니다. 물론 업로드 후 파일을 삭제할 수 있습니다. 예 : File f = 새 파일(); // upload f.delete(); – User404