Quantcast

Create attachment.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Create attachment.

Oren Lavi
Hello


I am trying to create an attachment using REST API - POST /rest/bug/(bug_id)/attachment

URL link: http://bugzilla.readthedocs.io/en/latest/api/core/v1/attachment.html#create-attachment



I get this error:

b'<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">\n<html><head>\n<title>414 Request-URI Too Large</title>\n</head><body>\n<h1>Request-URI Too Large</h1>\n<p>The requested URL\'s length exceeds the capacity\nlimit for this server.<br />\n</p>\n<hr>\n<address>Apache/2.2.15 (Red Hat) Server at 10.205.11.155 Port 80</address>\n</body></html>\n'



Response [414]



Probably because the data of the file is too long.

How can I create an attachment for large file?

I need to send the file data but it probably has problem with the file length.



Thanks



_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

RE: Create attachment.

Oren Lavi
Hello

I am using the post command but it probably generate very large URL.
I am using this command:
requests.post('http://my_server/bugzilla/rest/ bug/49/attachment', params=data)
The 'data'  variable is a dictionary that contains 'data' key that its value is very long (the file data).
How can I solve this problem?


-----Original Message-----
From: support-bugzilla [mailto:support-bugzilla-bounces+olavi=[hidden email]] On Behalf Of Thorsten Sch?ning
Sent: Tuesday, March 28, 2017 5:44 PM
To: [hidden email]
Subject: Re: Create attachment.

EXTERNAL EMAIL


Guten Tag Oren Lavi,
am Dienstag, 28. März 2017 um 15:42 schrieben Sie:

> Probably because the data of the file is too long.
> How can I create an attachment for large file?

Your either don't POST your file data, but GET it instead OR you do POST your file data, but build some very large URL as the target additionally and that leads to the error. If I was you I would focus on the former and make sure to really POST, e.g. looking at the traffic using Wireshark or such.

Mit freundlichen Grüßen,

Thorsten Schöning

--
Thorsten Schöning       E-Mail: [hidden email]
AM-SoFT IT-Systeme      http://www.AM-SoFT.de/

Telefon...........05151-  9468- 55
Fax...............05151-  9468- 88
Mobil..............0178-8 9468- 04

AM-SoFT GmbH IT-Systeme, Brandenburger Str. 7c, 31789 Hameln AG Hannover HRB 207 694 - Geschäftsführer: Andreas Muchow

_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
_______________________________________________
support-bugzilla mailing list
[hidden email]
https://lists.mozilla.org/listinfo/support-bugzilla
PLEASE put [hidden email] in the To: field when you reply.
Loading...