Skip to content

Commit d53ceff

Browse files
chore(dev): adjust dev settings for RFC file upload (ietf-tools#10287)
* chore(dev): disable nginx max_body_size * chore(dev): create missing dest dir Create the "prerelease" directory, if needed, when accepting RFC publication files. Gated not to impact production, where this directory should already exist.
1 parent 3ff0154 commit d53ceff

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

docker/configs/nginx-proxy.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ server {
44

55
proxy_read_timeout 1d;
66
proxy_send_timeout 1d;
7+
client_max_body_size 0; # disable checking
78

89
root /var/www/html;
910
index index.html index.htm index.nginx-debian.html;

ietf/api/views_rpc.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,12 @@ def post(self, request):
476476
doc_rev=rfc.rev, # expect None, but match whatever it is
477477
mtime=mtime,
478478
)
479-
shutil.move(ftm, self._fs_destination(ftm))
479+
destination = self._fs_destination(ftm)
480+
if (
481+
settings.SERVER_MODE != "production"
482+
and not destination.parent.exists()
483+
):
484+
destination.parent.mkdir()
485+
shutil.move(ftm, destination)
480486

481487
return Response(NotificationAckSerializer().data)

0 commit comments

Comments
 (0)