Skip to content

Image display - selecting directory #5

Description

@EOGrady21

Currently image directory is automatically selected based on metadata inputs

            imgs_path <-  paste0(input$basepath, '/', input$cruise, "/rois/vpr", input$tow,"/d", input$day, "/h", input$hour, "/")

but the user should also be able to directly select the image directory by using the Choose ROI Directory button. This should override the automatic ROI directory code

But this feature does not seem to be working.

I think this is the relevant code chunk

 path <- reactive({
        home <- input$dir$root
        file.path(home, paste(unlist(dir()$path[-1]), collapse = .Platform$file.sep))
    })

 observeEvent(input$dir, {
        values$upload_state <- 'uploaded'
    })
    # browser()
    imgs_path <- reactive({
      input$update # is this working?
        if (is.null(values$upload_state)) {
            
            imgs_path <-  paste0(input$basepath, '/', input$cruise, "/rois/vpr", input$tow,"/d", input$day, "/h", input$hour, "/")
           
        } else if (values$upload_state == 'uploaded') {
            imgs_path <- path()

        } 
    })

input$dir is the Choose ROI Directory button. Maybe because path() is only getting the root directory?
I'll need to do some more troubleshooting here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions