Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

By Maciek Kokot
Dear All,
I’m struggling migrating my web app from a Droplet to the app platform.
I have a buzzing Django app hosted on DO Droplet (Ubuntu 18 + Gunicorn + Nginx). My aim is to migrate the whole thing to the App platform.
I have most of the setup figured out - my static files remain part of the slug, and my media files are handled by django-storages/boto3 and uploaded to DO Space.
What I’m missing is storing files uploaded with Form.FileField, but not stored explicitly. The process I’m trying to accommodate is:
The code bit in question is:
>def upl_list(request):
>form = listForm
>if request.method == 'POST':
>filled_form = form(request.POST, request.FILES)
>if filled_form.is_valid():
>testedlist = filled_form.cleaned_data['NipAccList']
>VerifDate = filled_form.cleaned_data['VerifDate']
>df = pd.read_excel(testedlist, header=None, usecols=[0, 1], dtype=str)
Disclaimer: not sure how to bypass the markdown, but let’s assume indentation and syntax are correct.
The above code parses the uploaded Excel nicely on the droplet, but when the same sequence is executed on the App platform, I get the “file not found error”:
FileNotFoundError at /whitelist/list
[Errno 2] No such file or directory: 'uploaded_file.xlsx'
Request Method: POST
Request URL: <my App platform endpoint<
Django Version: 3.1.5
Exception Type: FileNotFoundError
Exception Value:
[Errno 2] No such file or directory: 'uploaded_file.xlsx'
The execution fails at "df = pd.read_excel(...)". the "testedlist" variable seems to be assigned correctly (did I mention the whole thing works on a Droplet?).
Where do I look? What do I configure? What am I missing?
SarkariResultht
KFSys
Arne van Hoorn
alexdo
4287c71658bd4ea39bef277d491b1c
4287c71658bd4ea39bef277d491b1c
Demanix
Demanix
devjk1
Jordan
LC Labs Sp. z o.o.
a0cd9be01b14447384f79073fc121f