Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • allgo allgo
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 82
    • Issues 82
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • allgo
  • allgoallgo
  • Issues
  • #306

Closed
Open
Created Mar 15, 2019 by LETORT Sebastien@sletortContributor

APIDownloadView doesn't seem to work

Just look this :

curl -H 'Authorization: Token token=kQ3IT3KMdK95Sv97AprTSmp7pl7DBfbA' 'http://localhost:8008/api/v1/jobs/1' | jq .
{
  "1": {
    "files": {
      "test.txt": "http://localhost:8008/datastore/1/test.txt",
      "allgo.log": "http://localhost:8008/datastore/1/allgo.log",
      "test2.csv": "http://localhost:8008/datastore/1/test2.csv"
    },
    "status": "done"
  }
}

Ok, my job is done, and some files are availables.
If I try to get them through the API (not the url provided)

curl -H 'Authorization: Token token=kQ3IT3KMdK95Sv97AprTSmp7pl7DBfbA' 'http://localhost:8008/api/v1/datastore/1/allgo.log'

# HTML error no URL pattern found

If I use the URL provided with job status = not using API

curl -H 'Authorization: Token token=kQ3IT3KMdK95Sv97AprTSmp7pl7DBfbA' 'http://localhost:8008/datastore/1/allgo.log'

# HTML error no URL pattern found

Indeed, the corresponding API URL : url(r'^datastore/(?P<pk>\d+)/(.*)/(.*)', views.APIDownloadView, name='download'), looks wrong. => /(.*) useless. Also, but not impacting here we should use as_view() method.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking