Browse Source

add dataset_id

tags/vopendata0.1.2
e 5 years ago
parent
commit
43075fe69c
2 changed files with 2 additions and 3 deletions
  1. +1
    -0
      routers/repo/attachment.go
  2. +1
    -3
      web_src/js/index.js

+ 1
- 0
routers/repo/attachment.go View File

@@ -263,6 +263,7 @@ func AddAttachment(ctx *context.Context) {
UploaderID: ctx.User.ID,
Name: ctx.Query("file_name"),
Size: ctx.QueryInt64("size"),
DatasetID: ctx.QueryInt64("dataset_id"),
})

if err != nil {


+ 1
- 3
web_src/js/index.js View File

@@ -2414,9 +2414,6 @@ $(document).ready(async () => {
});
this.on('success', (file, data) => {
var uuid = $dataset.data('uuid');
console.log(uuid);
console.log(file.name);
console.log(file.size);
filenameDict[file.name] = uuid;
const input = $(`<input id="${uuid}" name="files" type="hidden">`).val(uuid);
$('.files').append(input);
@@ -2425,6 +2422,7 @@ $(document).ready(async () => {
uuid: uuid,
file_name: file.name,
size: file.size,
dataset_id: $dataset.data('dataset-id'),
_csrf: $dataset.data('csrf')
});
}


Loading…
Cancel
Save