mirror of
https://github.com/w-okada/voice-changer.git
synced 2025-01-23 13:35:12 +03:00
update
This commit is contained in:
parent
d71c931772
commit
46597a4c2b
File diff suppressed because one or more lines are too long
@ -4,6 +4,7 @@ import logging
|
|||||||
from logging.config import dictConfig
|
from logging.config import dictConfig
|
||||||
import sys, os
|
import sys, os
|
||||||
import base64
|
import base64
|
||||||
|
import traceback
|
||||||
|
|
||||||
DATA_ROOT = "./"
|
DATA_ROOT = "./"
|
||||||
dictConfig({
|
dictConfig({
|
||||||
@ -34,17 +35,20 @@ def redirect_to_index():
|
|||||||
|
|
||||||
CORS(app, resources={r"/*": {"origins": "*"}})
|
CORS(app, resources={r"/*": {"origins": "*"}})
|
||||||
|
|
||||||
@app.route('/test', methods=['POST'])
|
@app.route('/api/voice', methods=['POST'])
|
||||||
def test():
|
def api():
|
||||||
try:
|
try:
|
||||||
|
print("POST REQUEST PROCESSING....\n")
|
||||||
|
print(request)
|
||||||
# filename = f"{prefix}{index:03}.zip"
|
# filename = f"{prefix}{index:03}.zip"
|
||||||
# data_dir = os.path.join(DATA_ROOT, title)
|
filename = f"AAAAAAAAAAA.zip"
|
||||||
# os.makedirs(data_dir,exist_ok=True)
|
data_dir = os.path.join(DATA_ROOT)
|
||||||
# fullpath = os.path.join(data_dir, filename)
|
os.makedirs(data_dir,exist_ok=True)
|
||||||
# data = base64.b64decode(request.json['data'])
|
fullpath = os.path.join(data_dir, filename)
|
||||||
# f = open(fullpath, 'wb')
|
data = base64.b64decode(request.json['data'])
|
||||||
# f.write(data)
|
f = open(fullpath, 'wb')
|
||||||
# f.close()
|
f.write(data)
|
||||||
|
f.close()
|
||||||
data = {
|
data = {
|
||||||
"message":"OK_TEST"
|
"message":"OK_TEST"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user