mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
Merge pull request #679 from mattermost/fix-file-content-type
Blank Content-Type for file GETs.
This commit is contained in:
@@ -349,6 +349,7 @@ func getFile(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
|
||||
w.Header().Set("Cache-Control", "max-age=2592000, public")
|
||||
w.Header().Set("Content-Length", strconv.Itoa(len(f)))
|
||||
w.Header().Set("Content-Type", "") // need to provide proper Content-Type in the future
|
||||
w.Write(f)
|
||||
}
|
||||
|
||||
|
||||
@@ -20,12 +20,11 @@ export default class FileUpload extends React.Component {
|
||||
}
|
||||
|
||||
fileUploadSuccess(channelId, data) {
|
||||
var parsedData = $.parseJSON(data);
|
||||
this.props.onFileUpload(parsedData.filenames, parsedData.client_ids, channelId);
|
||||
this.props.onFileUpload(data.filenames, data.client_ids, channelId);
|
||||
|
||||
var requests = this.state.requests;
|
||||
for (var j = 0; j < parsedData.client_ids.length; j++) {
|
||||
delete requests[parsedData.client_ids[j]];
|
||||
for (var j = 0; j < data.client_ids.length; j++) {
|
||||
delete requests[data.client_ids[j]];
|
||||
}
|
||||
this.setState({requests: requests});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user