LC Server Image Weirdness
Paul Hibbert
paulhibbert at mac.com
Sun Jul 21 00:16:48 EDT 2013
Hi Rick,
I'm no expert in this area, but it sounds to me like the image is not being released after the upload, other list readers may have a better idea.
If you are using "Open File", "Write to File" etc., make sure you also use "Close File" after the upload to release the image file for other applications to use (i.e. the browser).
If that's not the case, maybe Jacqueline's suggestion to a similar problem I had a while ago, using the shell touch command may help, I think this should still work on the Server.
put "touch -c " & quote & <path/to/your/image.jpg> & quote into tCmd
get shell(tCmd)
More info on the Touch command here…
https://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man1/touch.1.html
No guarantees, but may be worth a try.
Paul
On 2013-07-20, at 9:17 AM, Rick Harrison wrote:
> Ok, so I have the LC 6.1.0 server
> running on a Macintosh, and I'm
> uploading an image to the server
> through a webpage and storing it
> onto the server.
>
> I'm trying to display the image
> on the webpage to show that
> it completed properly etc.
>
> I'm using the statement:
>
> put "<img src=" & quote & tNewName & quote & " /></a><br />" & cr
>
> The webpage completes all the
> way through without errors, but the
> image doesn't display at all. The
> image gets uploaded, but when I
> try to open the image with "Preview",
> it complains that the image is
> corrupted somehow. I find I can
> open the image up just fine in
> "GraphicConverter" and if I then
> save the file using "GraphicConverter"
> the file gets fixed and will
> display properly in "Preview".
>
> If I put in a statement like:
>
> put image "BogusImageName" into VarBogusImageName
>
> into the .lc webpage it causes the webpage to
> throw an error, (Chunk: no such object), as expected,
> but the interesting thing is that now
> the image I was trying to display before that wasn't showing
> now shows up just fine! Furthermore, the file uploaded
> shows up fine in Preview without any corruption whatsoever.
>
> Does anyone have a clue as to what is causing this weirdness
> and what I can do to fix the problem of the image not showing?
>
> Thanks in advance,
>
> Rick
>
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list