You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 to https://<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 a request.session with the appropriate cookies (obtained with rookiepy).
However, uploading that image proofs to be hard as I can't figure out the correct POST call.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
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 to
https://<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 a
request.sessionwith the appropriate cookies (obtained withrookiepy).However, uploading that image proofs to be hard as I can't figure out the correct POST call.
Beta Was this translation helpful? Give feedback.
All reactions