Skip to content

feat: add upload folder command and improvs - #501

Closed
lordshashank wants to merge 1 commit into
filecoin-project:mainfrom
lordshashank:feat/pdp-upload-folder
Closed

lordshashank wants to merge 1 commit into
filecoin-project:mainfrom
lordshashank:feat/pdp-upload-folder

Conversation

@lordshashank

Copy link
Copy Markdown
Contributor
  • Implements uploadFolder CLI command, which recursively uploads all the files in folders to pdpservice.
  • Implements optional parameter of valid-time for jwt creation and defaults it to 24 hours.
  • Implements option addRoots parameter to uploadFile and uploadFolder command to upload and add root of particular file/folder in one go rather than running separate commands.
  • Refactors code to use functions for repetitive tasks.

Future improvs:-

  • multiple root additions in single POST call to pdp-miner has some bugs i.e. is not working properly, hence currently makes multiple request for each roots.

@LexLuthr
LexLuthr requested review from ZenGround0 and magik6k April 29, 2025 12:16
Comment thread cmd/pdptool/main.go Outdated
Comment thread cmd/pdptool/main.go
Comment on lines +364 to +371
Flags: []cli.Flag{
&cli.IntFlag{
Name: "valid-time",
Usage: "Validity time of the JWT token in hours",
Value: 24, // Default to 1 day
},
},

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't this always set the JWT validity to 24 hours by default? I am not sure how PDP works but this means that JWT token handed off to SP will no longer be valid after 24 hours. How will client check anything after that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also don't know, but i created one for month and it is rendering me data until now.

…dity time and enhance upload file and folder command with optional addRootsCommand
@lordshashank
lordshashank force-pushed the feat/pdp-upload-folder branch from 7c78d34 to 5057bf8 Compare April 29, 2025 14:34
@LexLuthr

LexLuthr commented Sep 1, 2025

Copy link
Copy Markdown
Collaborator

Closing this as we are moving away from pdptool.

@LexLuthr LexLuthr closed this Sep 1, 2025
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

Successfully merging this pull request may close these issues.

2 participants