diff --git a/client/modules/IDE/actions/files.js b/client/modules/IDE/actions/files.js index d9bb8e9f..cf09198b 100644 --- a/client/modules/IDE/actions/files.js +++ b/client/modules/IDE/actions/files.js @@ -71,7 +71,8 @@ export function createFile(formProps) { if (state.project.id) { const postParams = { name: createUniqueName(formProps.name, state.files), - url: formProps.url + url: formProps.url, + content: formProps.content || '' }; axios.post(`${ROOT_URL}/projects/${state.project.id}/files`, postParams, { withCredentials: true }) .then(response => { diff --git a/client/modules/IDE/actions/uploader.js b/client/modules/IDE/actions/uploader.js index ee305990..ad5e9c51 100644 --- a/client/modules/IDE/actions/uploader.js +++ b/client/modules/IDE/actions/uploader.js @@ -33,6 +33,7 @@ export function dropzoneAcceptCallback(file, done) { // for text files and small files // check mime type // if text, local interceptor + console.log(file.type); if (file.type.match(/text\//)) { localIntercept(file).then(result => { file.content = result; // eslint-disable-line