@@ 18,7 18,11 @@ user_blueprint = Blueprint('user', __name__,
@user_blueprint.route('/upload', methods=['POST'])
@login_required
def file_upload():
- dest_dir = tempfile.mkdtemp(prefix=f"tmp_ridecasa_{current_user.id}")
+ # allow setting a subdir in /tmp for cases where importer and web backend
+ # are different containers
+ if (tmp_dir := os.environ.get('RIDECASA_TMP_DIR')) is None:
+ tmp_dir = '/tmp'
+ dest_dir = tempfile.mkdtemp(prefix=f"{tmp_dir}/tmp_ridecasa_{current_user.id}")
# handle multiple files, or one
files = []