Skip to content

how to create a file to wiki repos via api #19459

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

Closed
wupei1024 opened this issue Apr 21, 2022 · 6 comments
Closed

how to create a file to wiki repos via api #19459

wupei1024 opened this issue Apr 21, 2022 · 6 comments
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.

Comments

@wupei1024
Copy link

Feature Description

how to create a file to wiki repos via api ,
the wiki repository 's name is "xxxx.wiki‘ when use api to create a file returns 404.

Screenshots

No response

@wupei1024 wupei1024 added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Apr 21, 2022
@Gusted
Copy link
Contributor

Gusted commented Apr 21, 2022

You can create a wiki page via the API: https://try.gitea.io/api/swagger#/repository/repoCreateWikiPage Please check if the input's are correct, 404 means it didn't found the repository you did specify.

@Gusted Gusted closed this as completed Apr 21, 2022
@Gusted Gusted added type/question Issue needs no code to be fixed, only a description on how to fix it yourself. and removed type/proposal The new feature has not been accepted yet but needs to be discussed first. type/feature Completely new functionality. Can only be merged if feature freeze is not active. labels Apr 21, 2022
@wupei1024
Copy link
Author

not a page , i want to commit an image to wiki repository 。like create a file to normal repository.

@wupei1024
Copy link
Author

create a file to repository --->ok
create a file to wiki repository ,use xxxx.wiki as repository name in api ---failure

@Gusted
Copy link
Contributor

Gusted commented Apr 21, 2022

Please better specify your question next time, but you cannot upload a file to a wiki. The wiki doesn't behave as a git repo. If you want to upload a file, use the repository, using a picture in a wiki page, you will have to use markdown for that ![A picture](link_to_picture)

@wupei1024
Copy link
Author

Please better specify your question next time, but you cannot upload a file to a wiki. The wiki doesn't behave as a git repo. If you want to upload a file, use the repository, using a picture in a wiki page, you will have to use markdown for that ![A picture](link_to_picture)

yes, but i want to use an tool upload the attachment(image) to the wiki repository when i editing the wiki page.
use git to commit an image every time is troublesome..

@Gusted
Copy link
Contributor

Gusted commented Apr 21, 2022

Watch the corresponding issue for that: #17231

@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.
Projects
None yet
Development

No branches or pull requests

2 participants