Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LocalFiles Type Images have no href #1280

Closed
CMarker opened this issue Apr 4, 2015 · 6 comments
Closed

LocalFiles Type Images have no href #1280

CMarker opened this issue Apr 4, 2015 · 6 comments
Labels

Comments

@CMarker
Copy link

CMarker commented Apr 4, 2015

There is no .href property on .image property of LocalFiles Type. Given the example in: keystonejs/keystone#700 there should be a .href property for each image of LocalFiles Type with the correct routable address.

@jorisw
Copy link

jorisw commented May 29, 2015

Any word on this? I too am trying to simply link to or download a stored file of type localFile. How do I link to one? Concatenating the prefix and the filename in the object data give me a 404.

@CMarker
Copy link
Author

CMarker commented May 29, 2015

<img src="<%= "/files/" + data.post.image.filename %>"class="img-responsive" style="">

This worked for me after some trial and error. It's not ideal but I haven't found a better way yet. The image will be stored at /data/files/ but is exposed via the /files/ route.

@jorisw
Copy link

jorisw commented May 29, 2015

Yeah concatenaning will work. Thanks.

tylkomat pushed a commit to tylkomat/keystone that referenced this issue Jul 8, 2015
@tylkomat
Copy link

tylkomat commented Jul 8, 2015

I can confirm this. href is always empty

@tylkomat
Copy link

tylkomat commented Jul 8, 2015

also exists does not work. There is no error but also no output.

tylkomat pushed a commit to tylkomat/keystone that referenced this issue Jul 8, 2015
- removed href from path again
- added virtual function href to nested schema
JedWatson added a commit that referenced this issue Jul 13, 2015
Fix for #1280 href working now on LocalFiles Type
@mxstbr mxstbr added bug and removed needs input labels Apr 29, 2016
@stennie
Copy link
Contributor

stennie commented Jun 24, 2018

Closing out stale issues which predate the Keystone 4 development cycle. It looks like a fix for this issue was previously merged in PR #1516.

If this still affects Keystone 4, please create a new report with further details.

Thanks,
Stennie

@stennie stennie closed this as completed Jun 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants