azure-search-openai-demo icon indicating copy to clipboard operation
azure-search-openai-demo copied to clipboard

File uploading limitation

Open mirojs opened this issue 1 year ago • 5 comments
trafficstars

Please provide us with the following information:

Trying to upload two PDFs individually, one around 50MB (scanned), the other 70MB(non-scanned), but got "Error uploading file - please try again or contact admin".

--> Already modified max_single_put_size=100 * 1024 * 1024, --> Document intelligence limit of standard plan is 500MB, --> Smaller size PDF beyond 30 pages was fine, --> Chrome Developer tool Status Code: 413 Payload Too Large

Please help to check, thanks.

This issue is for a: (mark with an x)

- [x] bug report -> please search issues before submitting
- [ ] feature request
- [ ] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Click upload button and select the file to upload.

Any log messages given by the failure

Expected/desired behavior

OS and Version?

Windows 7, 8 or 10. Linux (which distribution). macOS (Yosemite? El Capitan? Sierra?)

azd version?

run azd version and copy paste here.

Versions

Mention any other details that might be useful


Thanks! We'll be in touch soon.

mirojs avatar Jun 08 '24 04:06 mirojs

It sounds like we need to do some re-architecting to support uploading larger file sizes, I don't think I tested with such large files, and we weren't sure what users would expect to upload. I'll tackle this when I can, but the next few weeks are a bit busy, so if others take this on, PRs welcome.

pamelafox avatar Jun 13 '24 05:06 pamelafox

Hi @pamelafox, has any changes been done to support uploading larger files? Are there any workarounds to the limitations of the data ingestion?

brainlie avatar Aug 08 '24 03:08 brainlie

bump @pamelafox! I have tried to manually hardcode the max file size in the code, but am getting issues with the timeouts. I have tried changing the timeout settings in the code and also using azure application gateway but it seems to not be working. Any other ideas?

brainlie avatar Aug 14 '24 05:08 brainlie

I was able to fix this by just adding the code line at my app.py file. I've tested it with 5MB limit and now scaled up to 20MB. Both is working like a charm. This should fix the problem of User file upload limits.

def create_app(): app = Quart(name) app.config['MAX_CONTENT_LENGTH'] = 20 * 1024 * 1024 # 10MB limit # Set the maximum upload size to 20MB (or whatever size you want) app.register_blueprint(bp)

cloudhunnter avatar Sep 12 '24 15:09 cloudhunnter

Go to app> backend> app.py In the function def create_app(): add this line -app.config['MAX_CONTENT_LENGTH'] = 20 * 1024 * 1024

(u can set the size by of your choice by changing the 20 input) I tried uploaded 100mb file and it was working for me

v-oshirke avatar Mar 07 '25 10:03 v-oshirke