Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better use of work.original_filename #2811

Closed
3 tasks done
benwbrum opened this issue Oct 12, 2021 · 5 comments
Closed
3 tasks done

Better use of work.original_filename #2811

benwbrum opened this issue Oct 12, 2021 · 5 comments

Comments

@benwbrum
Copy link
Owner

benwbrum commented Oct 12, 2021

Currently we store the original filename of an uploaded PDF on the work record, but it is not very visible in the UI, nor usable for exports. Since some organizations embed catalog identifiers in filenames, losing this is problematic.

Enhancements:

  • Display original_filename as a read-only field in the work settings tab
  • Add an option to use the original filename as the basename of PDF (and other?) formats in the bulk export
  • Check that original_filename and slug are both present in the metadata download spreadsheet for further reconciliation.
@benwbrum
Copy link
Owner Author

The first task is certainly doable as is the third. Two may require a bit of discussion.

@benwbrum
Copy link
Owner Author

While the second task is finished, we need to address the first and third tasks.

To reproduce first task:

  • Log in as a project owner
  • Create a collection if there is not one already
  • From the collection, click the "Add work" tab
  • Upload a PDF file to the collection
  • Wait for the work to process.
    • (This will create a Work object, which should have an original_filename attribute matching the PDF file you uploaded
  • Visit the collection overview page
  • Click on the work
  • Click on the About tab.
  • If there is a non-blank value in @work.original_filename, it should be displayed along with other data about the work.
    • (A location toward the bottom, near the IIIF manifest, is probably best)

For the third task

  • After creating a collection and uploading a file--as in task 1--visit the Export screen
  • Click the "Work Metadata CSV" button
  • Look at the downloaded spreadsheet. If there are no columns for original_filename and slug, add them.

@symmetrically
Copy link
Contributor

@benwbrum it states that we store the original filename of an uploaded PDF on the work record which has original_filename attribute. Although I can see the uploaded_filename attribute which I'm considering the attribute you're talking about. Apart from that, I need further clarification about the work data. Which data/attributes should be displayed there?

@symmetrically
Copy link
Contributor

Regarding the third task, original_filename and slug columns are already there at the downloaded spreadsheet.

@benwbrum
Copy link
Owner Author

Ah. uploaded_filename is the correct attribute -- I was mistaken.

Currently app/views/works/show.html.slim shows most of the attributes we need, excepting the filename, so we just want code similar to https://github.com/benwbrum/fromthepage/blob/development/app/views/work/show.html.slim#L62-L64 for the filename, displayed above the IIIF manifest code.

symmetrically added a commit that referenced this issue Mar 15, 2023
saracarl added a commit that referenced this issue Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants