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

[Fanbox] Save file metadata #6058

Closed
Terrails opened this issue Aug 19, 2024 · 5 comments
Closed

[Fanbox] Save file metadata #6058

Terrails opened this issue Aug 19, 2024 · 5 comments

Comments

@Terrails
Copy link

I would like to get access to file metadata like fileId, filename, fileUrl and other. I already tried exec post-processor and then saving the given data through some script, but is there some way to dump full json data for each file?

@mikf
Copy link
Owner

mikf commented Aug 19, 2024

A metadata post processor. (--write-metadata, postprocessors: ["metadata"])

@Terrails
Copy link
Author

Oh... I just realized I just had to change the event to one that gets called for a file like prepare-after. Thanks!

I assume I have to set use something like content-format in order to filter only file specific fields and get rid of fields that are already present in the metadata file that gets created during "event": "post"?

@Hrxn
Copy link
Contributor

Hrxn commented Aug 20, 2024

content-format gives you the output you specify here.
If you want fileId, filename, fileUrl (assuming that this is what they are called), you can simply do this:

"content-format": "ID: {fileId}\nName: {filename}\nURL: {fileUrl}\n"

Pretty self-explanatory, really.

@mikf
Copy link
Owner

mikf commented Aug 25, 2024

I've also added an include and exclude option (4b94b7d), which allows for selecting which fields to include in JSON output.

@Terrails
Copy link
Author

I've also added an include and exclude option (4b94b7d), which allows for selecting which fields to include in JSON output.

Oh thats great, thank you so much!

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