Description
Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
this would behavior like ipfs cli ipfs add --pin=true ...
current file uploaded by webui doesn't get pinned, behavoir like ipfs add --pin=false ..., so I need to pin them manually.
I hope we can add a option/flag to make uploaded file automatily pinned, just like ipfs add --pin=true ...
Describe the solution you'd like
A clear and concise description of what you want to happen.
Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.
Additional context
Add any other context or screenshots about the feature request here.
Activity
welcome commentedon Jun 2, 2023on Jun 2, 2023
Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:
Finally, remember to use https://discuss.ipfs.io if you just need general support.
[-]automatically pin file when upload[/-][+]option to enable automatically pin file when upload[/+]whizzzkid commentedon Jun 6, 2023on Jun 6, 2023
Thanks for submitting this issue @trim21, is the ask here to have a global option to always "pin" files?
Maybe @lidel or @hacdias can elaborate more on this, there seems to be some discussion in this issue: ipfs/ipfs-gui#10 (comment) which seems to indicate that files imported are already implicitly pinned (maybe I'm wrong), I think if that's true, the "pin" feature should just be removed.
3 remaining items
whizzzkid commentedon Jun 22, 2023on Jun 22, 2023
@trim21 that is correct, if that's not the behaviour you experience. I'd like you to share your findings, that'll be a bug in the current implementation and that can be prioritized.
trim21 commentedon Jun 22, 2023on Jun 22, 2023
Thanks, this's the behaviour I want
whizzzkid commentedon Jul 13, 2023on Jul 13, 2023
Closing this issue as fixed, please feel free to reopen or submit a new issue if you face this again!
trim21 commentedon Jul 23, 2023on Jul 23, 2023
After some time, I find this is not a valid solution...
If you pin a directory with 2 files, and you upload a new file, the cid of directory will changed, the directory and newly uploaded file are not automatically pin-ed
trim21 commentedon Jul 23, 2023on Jul 23, 2023
For example, I have a directory called
images, it now have 2 files,1.jpgand2.jpgand I can pin directory

images, I'm actually pinning cid1, for exampleQmWVi3AM6mzfCD8gdVLfyuM6QJEzEbq1b34dkSwRsMuE2KBut when I upload a new image, the content of directory changed, therefore the cid of directory also changed, and the new directory(which has the same name) is not pinned anymore, which mean I have to pin this directory again.
And when I pin it, I'm actually pinning cid2, for example
Qmf4KCLrm2SCzCFkxFUt6c5QzNAW63W2xf6ghEj432XSrg(funny enough, when I remove the newly added file, I can see the directory is pinned again)
So the suggestion doesn't fix this issue, I still have to pin the file I uploaded.
trim21 commentedon Jul 23, 2023on Jul 23, 2023
@whizzzkid can you re-open this issue?
whizzzkid commentedon Jul 26, 2023on Jul 26, 2023
@trim21 ok yes I see what you mean, apologies, reopening this issue.
MidnightLightning commentedon Oct 13, 2023on Oct 13, 2023
I ran across this situation for my use-case too. In general a node keeps the items in the "files" area from being garbage-collected, but for different configurations of "Reprovider > Strategy", there is a setting for "pinned" but not for "in files", so having content be not just "in the local files directory" but actively pinned is important. Having the "pin" action in the "files" area not adjust when a file is uploaded then causes "orphaned pins" to exist (the previous CID of the folder is still pinned, when a new file is uploaded to it, and there's no way to browse/find that pin again in the UI without reverting the change to the folder in "Files").
I'd be in favor of the logic changing to:
Add a comment