MY_Upload | An addition to the CI_Upload , that allows for multiple | File Upload library
kandi X-RAY | MY_Upload Summary
kandi X-RAY | MY_Upload Summary
This library is an extension of the CI_Upload library that will allow you to upload multiple files.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Do the actual upload
- Returns the data for the uploaded files
- Display the errors
- Set the course
MY_Upload Key Features
MY_Upload Examples and Code Snippets
Community Discussions
Trending Discussions on MY_Upload
QUESTION
UPDATE: (5/18/2020) Solution at the end of this post!
I'm attempting to upload big CSV files (30MB - 2GB) from a browser to GCP App Engine running Python 3.7 + Flask, and then push those files to GCP Storage. This works fine on local testing with large files, but errors out immediately on GCP with a "413 - Your client issued a request that was too large" if the file is larger than roughly 20MB. This error happens instantly on upload before it even reaches my custom Python logic (I suspect App Engine is checking the Content-Length
header). I tried many solutions after lots of SO/blog research to no avail. Note that I am using the basic/free App Engine setup with the F1 instance running the Gunicorn server.
First, I tried setting app.config['MAX_CONTENT_LENGTH'] = 2147483648
but that didn't change anything (SO post). My app still threw an error before it even reached my Python code:
ANSWER
Answered 2020-May-17 at 21:28The answer is that you cannot upload or download files larger than 32 MB in a single HTTP request. Source
You either need to redesign your service to transfer data in multiple HTTP requests, transfer data directly to Cloud Storage using Presigned URLs, or select a different service that does NOT use the Global Front End (GFE) such as Compute Engine. This excludes services such as Cloud Functions, Cloud Run, App Engine Flexible.
If you use multiple HTTP requests, you will need to manage memory as all temporary files are stored in memory. This means you will have issues as you approach the maximum instance size of 2 GB.
QUESTION
I am trying to run a function foo
on an uploaded file then send the output file to the user, I have written a functions to store the uploaded file and send emails (both works),I need help in attaching the output file once the function is completed foo()
which takes about 1-2 hours to complete.
this is my views.py
ANSWER
Answered 2020-Mar-29 at 03:20As it is taking too long you said 1-2 hours, you can make a baground task of it using celery and call send_email_to
in that task itself. For attaching file you can look at EmailMessage
You can refer Celery here, add call send_mail_to
as delay function(run in baground) in your My_Upload function.
It should look something like:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install MY_Upload
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page