Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/configuration/VFBUploader/configuration.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"maxFileSize" : 5242880,
"queryType": "SimilarMorphologyToUserData",
"cookieStorageDays" : 100,
"cookiesLearnLink" : "https://en.wikipedia.org/wiki/HTTP_cookie",
"cookiesLearnLink" : "https://virtualflybrain.org/about/cookies/#functional-cookies",
"text" : {
"dialogTitle" : "Upload Data File",
"dialogSubtitle" : "Generate a nblast query from your own data.",
Expand Down
9 changes: 8 additions & 1 deletion components/interface/VFBUploader/VFBUploader.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,14 @@ class VFBUploader extends React.Component {
let newURL = window.location.origin + window.location.pathname + "?id=" + _id + "&q=" + _id + "," + this.configuration.queryType;

this.setState({ fileNBLASTURL: newURL, uploading : true });
window.setCookie(_id, newURL, this.configuration.cookieStorageDays);
/*
* Only remember the link if the user ticked the cookie box -- the dialog
* asks for consent, so storing it regardless made the checkbox decorative.
* The link is still shown to copy either way.
*/
if (this.state.cookies) {
window.setCookie(_id, newURL, this.configuration.cookieStorageDays);
}

axios.put(url,
formData, { headers: { 'Content-Type': this.configuration.contentType } }
Expand Down
Loading