Skip to content

Commit

Permalink
Parse URL path to determine file name
Browse files Browse the repository at this point in the history
  • Loading branch information
ishank011 committed Dec 9, 2021
1 parent 66071c8 commit c35a1c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion changelog/unreleased/fix-content-disposition.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ Bugfix: Fix content disposition header for public links files

https://github.com/cs3org/reva/pull/2303
https://github.com/cs3org/reva/pull/2297
https://github.com/cs3org/reva/pull/2332
https://github.com/cs3org/reva/pull/2332
https://github.com/cs3org/reva/pull/2346
2 changes: 1 addition & 1 deletion internal/http/services/owncloud/ocdav/get.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func (s *svc) handleGet(ctx context.Context, w http.ResponseWriter, r *http.Requ

w.Header().Set(HeaderContentType, info.MimeType)
w.Header().Set(HeaderContentDisposistion, "attachment; filename*=UTF-8''"+
path.Base(r.RequestURI)+"; filename=\""+path.Base(r.RequestURI)+"\"")
path.Base(r.URL.Path)+"; filename=\""+path.Base(r.URL.Path)+"\"")
w.Header().Set(HeaderETag, info.Etag)
w.Header().Set(HeaderOCFileID, wrapResourceID(info.Id))
w.Header().Set(HeaderOCETag, info.Etag)
Expand Down

0 comments on commit c35a1c9

Please sign in to comment.