Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 1.7.2
-
Component/s: ICE-Components
-
Labels:None
-
Environment:All
Description
When using the outputResource component to display pdfs, if attachement="true" the filename will be appended to the URL when the user selects save. If attachment="false", the filename is not included in the generated URL.
i.e:
http://localhost/testApp/Web/block/resource/LTE4NTk2MjU0MzQ=/filename.pdf
instead of just
http://localhost/testApp/Web/block/resource/LTE4NTk2MjU0MzQ=/
i.e:
http://localhost/testApp/Web/block/resource/LTE4NTk2MjU0MzQ=/filename.pdf
instead of just
http://localhost/testApp/Web/block/resource/LTE4NTk2MjU0MzQ=/
Activity
Tyler Johnson
created issue -
Tyler Johnson
made changes -
Field | Original Value | New Value |
---|---|---|
Salesforce Case | [50070000007CKUL] |
Tyler Johnson
made changes -
Assignee | Ken Fyten [ ken.fyten ] |
Ken Fyten
made changes -
Fix Version/s | 1.8DR#2 [ 10142 ] | |
Assignee Priority | P2 | |
Assignee | Ken Fyten [ ken.fyten ] | Yip Ng [ yip.ng ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #18008 | Tue Dec 09 14:20:36 MST 2008 | yip.ng | Added file name to generated URL. |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/core/ResourceDispatcher.java
|
yip.ng
made changes -
Status | Open [ 1 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Adnan Durrani
made changes -
Link | This issue depends on ICE-3869 [ ICE-3869 ] |
yip.ng
made changes -
Resolution | Fixed [ 1 ] | |
Status | Resolved [ 5 ] | Reopened [ 4 ] |
Repository | Revision | Date | User | Message |
ICEsoft Public SVN Repository | #18090 | Thu Dec 18 15:45:51 MST 2008 | yip.ng | Changed to encode URL file name of resource and make the resource registry pattern matching still work with the encoded URL. |
Files Changed | ||||
MODIFY
/icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/http/core/ResourceDispatcher.java
|
yip.ng
made changes -
Status | Reopened [ 4 ] | Resolved [ 5 ] |
Resolution | Fixed [ 1 ] |
Sam Xiao
made changes -
Attachment | test.jpg [ 11421 ] |
Sam Xiao
made changes -
Attachment | test.jpg [ 11421 ] |
yip.ng
made changes -
Attachment | ScreenHunter_01 Dec. 19 10.12.jpg [ 11422 ] |
Ken Fyten
made changes -
Fix Version/s | 1.8 [ 10161 ] | |
Assignee Priority | P2 |
Ken Fyten
made changes -
Status | Resolved [ 5 ] | Closed [ 6 ] |
Assignee | Yip Ng [ yip.ng ] |
Here is the fix for ResourceDispatcher.java:
private class FileNameOption implements Resource.Options {
{ return fileName; }private String fileName;
public String getFileName()
public void setAsAttachement()
{ // TODO Auto-generated method stub }public void setExpiresBy(Date date) { // TODO Auto-generated method stub }
public void setFileName(String fileName)
{ this.fileName = fileName; }public void setLastModified(Date date)
{ // TODO Auto-generated method stub }public void setMimeType(String mimeType) { // TODO Auto-generated method stub }
}
{ resource.withOptions(options); }public URI registerResource(Resource resource, ResourceLinker.Handler handler) {
if( handler == null )
handler = NOOPHandler;
final FileNameOption options = new FileNameOption();
try
catch (IOException e)
{ throw new RuntimeException(e); }final String filename = options.getFileName();
final String name = prefix + encode(resource) + "/" + (filename != null && filename != "" ? filename : "");