Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

How can I upload an image to the description of a snippet that is not part of a project?#3253

Unanswered
b-a0 asked this question inQ&A
Discussion options

I can create snippets, with a description and files, but cannot find how I can include an image in the description.

This is specifically for snippets that are "personal", i.e. not associated with a project.

By observing the browser network traffic I found that when I paste an image into the snippet description a POST call is made tohttps://<my-gitlab-instance>/uploads/personal_snippet?id=<my-user-id> with the image being sent as binary data. The call returns a relative URL that can then be included in the Markdown description.

However, I can't recreate that call using curl, or Python requests.

Does somebody have an example of how you can upload an image in the description?

Context

I am trying to migrate my snippets from one Gitlab instance to another.
Downloading the images from the source instance now works by extracting image url's from the Markdown description and downloading the url's using arequest.session with the appropriate cookies (obtained withrookiepy).
However, uploading that image proofs to be hard as I can't figure out the correct POST call.

You must be logged in to vote

Replies: 0 comments

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Category
Q&A
Labels
None yet
1 participant
@b-a0

[8]ページ先頭

©2009-2025 Movatter.jp