forked from sakaiproject/sakai
-
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.
SAK-32315 (Bug fix) : Problem uploading file to Urkund with multipart… (
sakaiproject#4067) * SAK-32315 (Bug fix) : Problem uploading file to Urkund with multipart post http request + Refactor : Included UrkundSubmission object to better manage parameters * Pull request : changes requested
- Loading branch information
Showing
3 changed files
with
67 additions
and
15 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
43 changes: 43 additions & 0 deletions
43
...iew/impl/urkund/src/main/java/org/sakaiproject/contentreview/urkund/UrkundSubmission.java
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,43 @@ | ||
/********************************************************************************** | ||
* | ||
* Copyright (c) 2017 Sakai Foundation | ||
* | ||
* Licensed under the Educational Community License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://opensource.org/licenses/ECL-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* | ||
**********************************************************************************/ | ||
package org.sakaiproject.contentreview.urkund; | ||
|
||
import lombok.Getter; | ||
import lombok.Setter; | ||
|
||
import java.util.Base64; | ||
|
||
|
||
public class UrkundSubmission { | ||
|
||
@Getter @Setter private String submitterEmail; | ||
@Getter @Setter private String filename; | ||
@Getter @Setter private String mimeType; | ||
@Getter @Setter private byte[] content; | ||
@Getter @Setter private String subject = ""; | ||
@Getter @Setter private String message = ""; | ||
@Getter @Setter private boolean anon = false; | ||
@Getter @Setter private String language = "en-US"; | ||
|
||
public String getFilenameEncoded() { | ||
try { | ||
return new String(Base64.getEncoder().encode(filename.getBytes("UTF-8"))); | ||
}catch(Exception e){} | ||
return ""; | ||
} | ||
} |
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