Comments (3)
Just adding PR here for reference: #12
I agree that a media endpoint should be supported in some way. Unfortunately I'm short of time at the moment.
If someone else could try out #12 and give feedback, then that would be 👍 👍 👍
from node-micropub-express.
Okay, I’ll take up the challenge! I’ve got a proof of concept going over on this branch (diff).
I’ve updated my dependency to point to @grantcodes updated node-micropub-express
package. For the mediaHandler
option, I’ve replicated the code used for the standard handler
, the thinking being that this already includes support for uploading media.
I have managed to advertise a media-endpoint
(based on a new config variable, which in my case I’m pointing straight back to this endpoint), however testing these changes using Micropub.rocks, I get the following results when trying to upload a photo:
✖️ Returned HTTP 201
✖️ Returned a Location
header
HTTP/1.1 500 Internal Server Error
Server: Cowboy
Connection: keep-alive
Content-Security-Policy: default-src 'self'
X-Content-Type-Options: nosniff
Content-Type: text/html; charset=utf-8
Content-Length: 148
Date: Sat, 03 Feb 2018 20:08:13 GMT
Via: 1.1 vegur
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
</head>
<body>
<pre>Internal Server Error</pre>
</body>
</html>
I suspect that means duplicating handler
was wishful thinking. Where am I going wrong, any clues?
from node-micropub-express.
Hmmm, I can find a references to Location
header in the tests for the existing handler, but it’s not clear what code is sending that. Could you give point me in the direction where this header gets set (and might need to be set in the mediaHandler
) please @voxpelli? Are headers governed by another dependancy?
from node-micropub-express.
Related Issues (14)
- Content property shouldn't always be required HOT 2
- Syndication Target Draft Spec Changed HOT 3
- Support space-separated list of scopes HOT 2
- Make at least some queries respond with JSON by default HOT 1
- Respond with 401 on wrong scopes
- Also support the "create" scope HOT 1
- Validate that the provided token is indeed a Bearer token
- Check if token endpoint returns a 2xx code before parsing response
- JSON processing should accept all data
- Dependency Dashboard
- Action Required: Fix Renovate Configuration
- Create alternative for Fastify
- Move from node-fetch to got HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-micropub-express.