#1 2022-02-14 14:10:13

MageCP
Member
Registered: 2022-02-02
Posts: 1

Files, Blob, Sqlite3, Insert, Retrieve

Hello guys,

I have few questions...

How can i save a file on db as blob?

How can i retrieve this file ?



THANKS FOR HELP!

SEE YOU SOON.

Offline

#2 2022-02-14 17:20:10

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,506
Website

Re: Files, Blob, Sqlite3, Insert, Retrieve

You have blob-related methods for the ORM.

But they use RawByteString so are limited to the memory.
They are meant for small content - up to a few MB, not huge files.

For big files, a direct storage in a local folder is better, from our experiment.

Offline

#3 2024-08-18 16:12:56

mormoter
Member
Registered: 2024-06-14
Posts: 20

Re: Files, Blob, Sqlite3, Insert, Retrieve

first: what cause the blob based on rawbytestring hava a limit of a few MB?
second:exactly how many MB?
  thanks

Offline

#4 2024-08-18 17:50:57

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,506
Website

Re: Files, Blob, Sqlite3, Insert, Retrieve

1) because it is pasted in memory, and because huge content is likely to be not needed in most cases, and subject to DoS attacks.

2) so it depends, first limitation is at HTTP server level: there is a MaxPayload parameter.

Offline

Board footer

Powered by FluxBB