newsletter-api-works
This commit is contained in:
parent
b70e80dacd
commit
97dd158358
|
@ -1,5 +1,5 @@
|
||||||
import MG from 'mailgun.js'
|
const MG = require('mailgun.js')
|
||||||
import fd from 'form-data'
|
const fd = require('form-data')
|
||||||
|
|
||||||
const mgOptions = {
|
const mgOptions = {
|
||||||
key: process.env.MAILGUN_API_KEY,
|
key: process.env.MAILGUN_API_KEY,
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import MG from 'mailgun.js'
|
const MG = require('mailgun.js')
|
||||||
import fd from 'form-data'
|
const fd = require('form-data')
|
||||||
|
|
||||||
const mgOptions = {
|
const mgOptions = {
|
||||||
key: process.env.MAILGUN_API_KEY,
|
key: process.env.MAILGUN_API_KEY,
|
|
@ -58,7 +58,6 @@ def upload_storj(filecontent, filename, bucket_name):
|
||||||
|
|
||||||
@app.route('/api/upload', methods=['post'])
|
@app.route('/api/upload', methods=['post'])
|
||||||
def upload():
|
def upload():
|
||||||
print(request.files)
|
|
||||||
print(request.files.to_dict())
|
print(request.files.to_dict())
|
||||||
# check if the post request has the file part
|
# check if the post request has the file part
|
||||||
if 'file' not in request.files:
|
if 'file' not in request.files:
|
||||||
|
|
|
@ -7,11 +7,11 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "/api/newsletter",
|
"src": "/api/newsletter",
|
||||||
"dest": "api/newsletter.ts"
|
"dest": "api/newsletter.js"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"src": "/api/feedback",
|
"src": "/api/feedback",
|
||||||
"dest": "api/feedback.ts"
|
"dest": "api/feedback.js"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user