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

Image not loading after upload #1

Closed
jeshocarmel opened this issue Aug 5, 2016 · 8 comments
Closed

Image not loading after upload #1

jeshocarmel opened this issue Aug 5, 2016 · 8 comments

Comments

@jeshocarmel
Copy link

Hi Keichan,

I just downloaded your sample application phoenix_exfile_test_app and used mariaex instead of postgres. I'm unable to view the uploaded image. I haven't changed any code apart from the mariaex configuration in mix.exs. The file has been uploaded into the tmp folder though.

test

@jeshocarmel
Copy link
Author

Invalid Parameter - /phoenix_exfile_test_app-master

@keichan34
Copy link
Owner

Can you paste the error message that the server is reporting here?

@jeshocarmel
Copy link
Author

jeshocarmel commented Aug 5, 2016

[info] Sent 200 in 1667ms
[info] GET /attachments/bMwcpAvQ_Q1k07iJD92F5cImTNvlFvKGVCZ5JOIDn_I=/store/fill/100/100/8889141db61fbbceed81d1981c202c0253414bd5f0e21e97de20f67bc1cf/file.jpg
[debug] [exfile] opening file: %Exfile.File{backend: %Exfile.Backend{backend_mod: Exfile.Backend.FileSystem, backend_name: "store", directory: "d:/phoenix_exfile_test_app-master/tmp/store", hasher: Exfile.Hasher.Random, max_size: -1, meta: %{}, postprocessors: [], preprocessors: []}, backend_meta:
[info] GET /attachments/9iq3WNm0jLQpWfnD6rAqPvHxccEx9zxXDoMiIJMfVEI=/store/fill/100/100/ea4b0233d0f5d51a35bccb6cdbcfccf81ff9c68b058dfa4e2b6a6a07a8d3/file.jpg
[debug] [exfile] opening file: %Exfile.File{backend: %Exfile.Backend{backend_mod: Exfile.Backend.FileSystem, backend_name: "store", directory: "d:/phoenix_exfile_test_app-master/tmp/store", hasher: Exfile.Hasher.Random, max_size: -1, meta: %{}, postprocessors: [], preprocessors: []}, backend_meta:
**Invalid Parameter - /phoenix_exfile_testInvalid Parameter - /phoenix_exfile_test_app-master
_app-master**
[info] Sent 500 in 479ms
[info] Sent 500 in 125ms
[debug] Ignoring unmatched topic "rooms:null" in PhoenixExfileTestApp.UserSocket

FYI, my development environment is windows

@keichan34
Copy link
Owner

Hm. Could be a windows compatibility problem. I'll investigate a bit more and get back to you.

@jeshocarmel
Copy link
Author

okay . noted

@noma4i
Copy link

noma4i commented Aug 16, 2016

Probably Iv found culprit. Path.exand in windows should expand using \ but joining remain root_path looks incorrect. So resulting path is /some_where\here\one_more_level

That's it. Btw running even Dev env for elixir on windows is a pure suicide. Consider using windows 10 ubuntu bash. Nice blogpost at Microsoft

@keichan34
Copy link
Owner

I see. Thanks for figuring out what the problem was. I found this issue in elixir elixir-lang/elixir#1236 that's similar -- it says that Erlang will automatically translate / to \ when running in Windows, but maybe that doesn't work if the path separators are all mixed up?

Anyways, thanks for your help! I'll be closing this issue for now, but I eventually want to get it working, so I will leave the original issue on keichan34/exfile#37 open until it's fixed.

@jeshocarmel
Copy link
Author

thanks @keichan34 . awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants