<feed xmlns='http://www.w3.org/2005/Atom'>
<title>pyfbin/fbin/file_storage, branch master</title>
<subtitle>Python file bin</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.jvnv.net/pyfbin/'/>
<entry>
<title>file_storage.s3: Return None on NoSuchKey errors</title>
<updated>2022-03-04T20:04:23+00:00</updated>
<author>
<name>Jon Bergli Heier</name>
<email>snakebite@jvnv.net</email>
</author>
<published>2022-03-04T20:04:23+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.jvnv.net/pyfbin/commit/?id=1b2f2b1a7f12cef801922eb5561fa402a9954d32'/>
<id>1b2f2b1a7f12cef801922eb5561fa402a9954d32</id>
<content type='text'>
This will cause the file handler to return 404 instead of 500.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will cause the file handler to return 404 instead of 500.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix linting errors</title>
<updated>2021-06-09T17:21:34+00:00</updated>
<author>
<name>Jon Bergli Heier</name>
<email>snakebite@jvnv.net</email>
</author>
<published>2021-06-09T17:19:56+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.jvnv.net/pyfbin/commit/?id=e96bedf7477d392b8821f76ca85038c198c84375'/>
<id>e96bedf7477d392b8821f76ca85038c198c84375</id>
<content type='text'>
Style, unused imports, unused variables, etc. as reported by flake8.
Configuration for flake8 has been added to setup.cfg.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Style, unused imports, unused variables, etc. as reported by flake8.
Configuration for flake8 has been added to setup.cfg.
</pre>
</div>
</content>
</entry>
<entry>
<title>file_storage.s3: Fix deleting object on file_add error</title>
<updated>2021-06-09T16:17:27+00:00</updated>
<author>
<name>Jon Bergli Heier</name>
<email>snakebite@jvnv.net</email>
</author>
<published>2021-06-09T16:17:27+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.jvnv.net/pyfbin/commit/?id=7c13b1038482d68c2ab581dad16fa81c0a09034e'/>
<id>7c13b1038482d68c2ab581dad16fa81c0a09034e</id>
<content type='text'>
Make sure obj is returned from upload_file so that we can delete it if
add_file raises an exception.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make sure obj is returned from upload_file so that we can delete it if
add_file raises an exception.
</pre>
</div>
</content>
</entry>
<entry>
<title>file_storage.filesystem: Close temp file after save</title>
<updated>2021-04-11T09:41:45+00:00</updated>
<author>
<name>Jon Bergli Heier</name>
<email>snakebite@jvnv.net</email>
</author>
<published>2021-04-11T09:41:45+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.jvnv.net/pyfbin/commit/?id=17c60d0bdf2948a8c55717b34d3231df7cbc141d'/>
<id>17c60d0bdf2948a8c55717b34d3231df7cbc141d</id>
<content type='text'>
This will ensure the file content is flushed and lets us get the actual
file size, which will fix very small files being stored with size == 0.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This will ensure the file content is flushed and lets us get the actual
file size, which will fix very small files being stored with size == 0.
</pre>
</div>
</content>
</entry>
<entry>
<title>Clean up leftover file path references</title>
<updated>2020-10-29T18:45:05+00:00</updated>
<author>
<name>Jon Bergli Heier</name>
<email>snakebite@jvnv.net</email>
</author>
<published>2020-10-29T18:45:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.jvnv.net/pyfbin/commit/?id=2498f142782e26681c542dfca4b3f9fc4ff64808'/>
<id>2498f142782e26681c542dfca4b3f9fc4ff64808</id>
<content type='text'>
This change removes and direct references to the filesystem from the
pyfbin code other that file_storage.filesystem. This should hopyfully be
the last changes needed for pyfbin to be successfully run using the
file_storage.s3 module without any issues.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change removes and direct references to the filesystem from the
pyfbin code other that file_storage.filesystem. This should hopyfully be
the last changes needed for pyfbin to be successfully run using the
file_storage.s3 module without any issues.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add fbin-backup.py</title>
<updated>2020-10-28T19:14:05+00:00</updated>
<author>
<name>Jon Bergli Heier</name>
<email>snakebite@jvnv.net</email>
</author>
<published>2020-10-28T19:14:05+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.jvnv.net/pyfbin/commit/?id=b1ed551c3125278d14a69750fea2bfe39cf68530'/>
<id>b1ed551c3125278d14a69750fea2bfe39cf68530</id>
<content type='text'>
This is a backup script which will copy files to a target storage, and
optionally add database entries as well. It works by specifying a source
and a target config file. Both should have separate storage configured,
and files will be copied from the source storage to the target storage.

The list of files to copy is read from the source database, which means
this must be accessible from where the script is run, not just the
storage. If updating databse entries the target database must also be
accessible. The target database is also check for any existing file
hashes, and any files that would cause a collision will be skipped.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a backup script which will copy files to a target storage, and
optionally add database entries as well. It works by specifying a source
and a target config file. Both should have separate storage configured,
and files will be copied from the source storage to the target storage.

The list of files to copy is read from the source database, which means
this must be accessible from where the script is run, not just the
storage. If updating databse entries the target database must also be
accessible. The target database is also check for any existing file
hashes, and any files that would cause a collision will be skipped.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use flask-sqlalchemy instead of using sqlalchemy directly</title>
<updated>2020-10-28T18:16:34+00:00</updated>
<author>
<name>Jon Bergli Heier</name>
<email>snakebite@jvnv.net</email>
</author>
<published>2020-10-28T18:16:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.jvnv.net/pyfbin/commit/?id=0faa732c9a3e1ffced2b26bee682f513b0e5f0ae'/>
<id>0faa732c9a3e1ffced2b26bee682f513b0e5f0ae</id>
<content type='text'>
This makes database access a bit easier and also greatly simplifies some
upcoming changes.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This makes database access a bit easier and also greatly simplifies some
upcoming changes.
</pre>
</div>
</content>
</entry>
<entry>
<title>filesystem: Fix error on max file size</title>
<updated>2019-12-08T20:58:18+00:00</updated>
<author>
<name>Jon Bergli Heier</name>
<email>snakebite@jvnv.net</email>
</author>
<published>2019-12-08T20:58:18+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.jvnv.net/pyfbin/commit/?id=f205f01afc4beb10b84d2c33c2c244a4c4d71619'/>
<id>f205f01afc4beb10b84d2c33c2c244a4c4d71619</id>
<content type='text'>
Move the chmod call into the try block so we always call this when
add_file succeeds, otherwise new_file might not be set yet and we will
get an UnboundLocalError.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Move the chmod call into the try block so we always call this when
add_file succeeds, otherwise new_file might not be set yet and we will
get an UnboundLocalError.
</pre>
</div>
</content>
</entry>
<entry>
<title>s3: Delete file if add_file raises an exception</title>
<updated>2019-12-07T10:19:00+00:00</updated>
<author>
<name>Jon Bergli Heier</name>
<email>snakebite@jvnv.net</email>
</author>
<published>2019-12-07T10:19:00+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.jvnv.net/pyfbin/commit/?id=ca5cc4e8811a8244422fdfab61254b866b822eee'/>
<id>ca5cc4e8811a8244422fdfab61254b866b822eee</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add max file size configuration</title>
<updated>2019-12-07T10:14:01+00:00</updated>
<author>
<name>Jon Bergli Heier</name>
<email>snakebite@jvnv.net</email>
</author>
<published>2019-12-07T10:14:01+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.jvnv.net/pyfbin/commit/?id=f1cfaef5b0f358c94fe7f5e7c2eb5a6d261a85ae'/>
<id>f1cfaef5b0f358c94fe7f5e7c2eb5a6d261a85ae</id>
<content type='text'>
This allows configuring max file sizes for both registered and anonymous
users. For registered users the USER_FILE_SIZE_LIMIT is used, and
ANONYMOUS_FILE_SIZE_LIMIT for anonymous users. If the size is not
specified or None, the limit is not enforced. Setting the limit to 0
effectively disables uploads.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allows configuring max file sizes for both registered and anonymous
users. For registered users the USER_FILE_SIZE_LIMIT is used, and
ANONYMOUS_FILE_SIZE_LIMIT for anonymous users. If the size is not
specified or None, the limit is not enforced. Setting the limit to 0
effectively disables uploads.
</pre>
</div>
</content>
</entry>
</feed>
