mostafa-abdullah / kheir-blogger

2 stars 3 forks source link

API | cannot access images #179

Closed hussamsh closed 8 years ago

hussamsh commented 8 years ago

I still can't access the gallery on the server , even from /storage/app/db/gallery/event_id/photo_name it downloads a file with an unknown extension.

Omarkojak commented 8 years ago

msh fahm asdk f anhy 7ta lma btupload wla btsave wla btadd elcaptions

AhmadElsagheer commented 8 years ago

They are saved without extensions on the server but they can be displayed properly

hussamsh commented 8 years ago

@Omarkojak la2 ana 2asdy lama bahawel a get image mo3aina

@AhmadElsagheer When I try it with the route given above it downloads a file with an unknown extension but after adding .jpeg extension as you said, it works ! Shouldn't the backend handle this and give me an image not a file that I have to convert ? also the libraries I use need a jpeg response to directly download and convert the image into bitmaps, and I think that downloading and then converting files will add unnecessary overhead to the app development process !

AhmadElsagheer commented 8 years ago

ok, I will look for a solution

AhmadElsagheer commented 8 years ago

Assume that the links you receive will have the extension included

hussamsh commented 8 years ago

I receive a file not a link , even adding .jpeg to route end doesn't work , and as I mentioned I don't manually convert files to images, I use libraries that does that for me and it needs the response to be a jpeg or any other image format file, the backend should convert the files and then send me a URL to the location of the photo on the server (If done correctly , said URL should open a photo in the browser not download it)

AhmadElsagheer commented 8 years ago

Assuming development and running on localhost, it will be accessible through http://localhost:8000/storage/app/db/gallery/[event_id]/[returned_value] It will open correctly in the browser. This issue will be closed upon merging the corresponding pull request

hussamsh commented 8 years ago

The [returned_value] is the photo name ?

AhmadElsagheer commented 8 years ago

yes including the extension