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

Send original filename to ifarchive-commit #45

Closed
dfabulich opened this issue Feb 21, 2024 · 1 comment
Closed

Send original filename to ifarchive-commit #45

dfabulich opened this issue Feb 21, 2024 · 1 comment

Comments

@dfabulich
Copy link
Contributor

Apropos iftechfoundation/ifdb-suggestion-tracker#448

https://ifarchive.org/misc/org-procedures.html explains that when users upload HTML to ifarchive.org, the archive team clicks a button to zip it up. This changes the filetype of the file as it was uploaded to IFDB.

Later, when the archive team clicks the "Notify IFDB" button, which pings ifarchive-commit, the pending link will be updated to point to the ZIP file, but we won't update the file type of the link on IFDB. This requires manual work for the archive team to fix the file type and make the link work.

In order for IFDB to do the fixup automagically, we'd need to know the original filename of the file, so IFDB's Play Online button can link to it directly via unbox.

Perhaps pass it in an original_filename URL parameter?

@erkyrath
Copy link
Member

Right. The ifarchive-commit request now looks like

https://ifdb.org/ifarchive-commit?ifdbid=1235531&path=if-archive/books/the-book&key=YYYY&tuid=abc123&original_filename=stuff.txt.orig

There's one thing to watch out for, though. If a file is uploaded more than once, we'll have multiple upload records. Since the primary key for this is the file MD5, we can't tell the records apart.

Therefore, it's possible that the request will come in with multiple tuid or original_filename keys. Or none, conceivably.

(There will be exactly one ifdbid key, though.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants