Been working on some apps, and I was using the same naming convention for the images. logo.png for the logo, and screen#.png for the screens. However, they all shared the same logo, because it looks like it puts the images in sites/default/files/styles/apps_screenshot/public/apps/file.name. So all of them are referencing sites/default/files/styles/apps_screenshot/public/apps/logo.png. Each app should probably get its own folder in there.

Files: 

Comments

Status:Active» Needs review
StatusFileSize
new2.82 KB

Attaching a patch that fixes a handful of things:

  • Images are now saved to apps/machine_name/image.jpg or what have you.
  • apps_retrieve_app_image now handles bad URLs much more gracefully. Checks status code (less than 400) though maybe we should also be checking for an image/ MIME type.
  • Updated screenshots/logos now replace, instead of rename.
  • If image isn't properly saved, everything should still display alright now sans image. Before it would just crap out at the server that was holding the bad image.

Status:Needs review» Closed (duplicate)

I have incorporated this patch into my work on #1621474: Allow Apps to function when offline

Thanks for the patch, it works like a charm