mirror of
https://github.com/JLiscom/OpenNote.git
synced 2026-04-25 08:15:48 +03:00
[GH-ISSUE #89] Can't see images after upload #80
Labels
No labels
bug
enhancement
pull-request
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/OpenNote-JLiscom#80
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @DonLafferty on GitHub (Sep 30, 2014).
Original GitHub issue: https://github.com/JLiscom/OpenNote/issues/89
I can upload images and they are in the uploads folder but all I see in the CK Editor is a broken image icon. If I rename the files in upload to have the old file type (jpg) I can see them and open them in an image program.
I'm wondering if this is an OpenNote issue or a CK Editor issue. All I know for sure is i would like to use this but I can't unless I can import images.
@JLiscom commented on GitHub (Sep 30, 2014):
@DonLafferty We rename the image to a GUID on the disk. Can you look on the disk and see if the file was saved?
@DonLafferty commented on GitHub (Sep 30, 2014):
Yes the file was saved. I must not have been clear in my post. There is a file in the upload folder and there is also an entry in my mysql table showing the filename, the original filename, and the GUID.
When I look at the source by clicking the View Source tab I also see the new filename.
But I also notice when I select it to upload it there is no preview of the file I'm trying to upload. I see a red X and a bunch of lorem ipsum filler.
@JLiscom commented on GitHub (Sep 30, 2014):
@DonLafferty Can you make a copy the file on disk and add a .jpg extension to see if it is a valid jpg?Then try seeing if you can you can download the file by formatting it a a href?
Can you also give me the return code from the console when you try to upload?
What browser are you using?
@DonLafferty commented on GitHub (Sep 30, 2014):
I did change the extension and it was a valid jpg.
I am using Chrome but I tried it with IE just to see and that was no better. I could always try Firefox if you wanted.
I'm not quite sure what you mean when you say the return code from the console. Do you want me to open the browser console or???
@JLiscom commented on GitHub (Sep 30, 2014):
@DonLafferty Ya if you press F12 and go into the console tab, try uploading an image and see if a error is thrown.
@JLiscom commented on GitHub (Sep 30, 2014):
@DonLafferty If you give me your install url I can try it.
@DonLafferty commented on GitHub (Sep 30, 2014):
The character encoding of a framed document was not declared. The document may appear different if viewed without the document framing it.
That was the error.
I also see it's putting the link as localhost/opennotes/Service/file/{GUID here} but the file is ending up in the localhost/opennotes/Service/upload/ folder.
@DonLafferty commented on GitHub (Sep 30, 2014):
I'm behind a firewall unfortunately.
@DonLafferty commented on GitHub (Sep 30, 2014):
In Chrome console I see this too.
GET http://192.168.254.22/opennotes/Service/file/F7B0DFCD-0126-BFDD-5CE4-6D60468C6C7A 404 (Not Found)
@DonLafferty commented on GitHub (Sep 30, 2014):
Is it related to the fact it has both Service/upload and Service/file?
@DonLafferty commented on GitHub (Sep 30, 2014):
ReferenceError: entryURL is not defined
at forceLogin (http://192.168.254.22/opennotes/openNote/openNote.js:57:6)
at http://192.168.254.22/opennotes/openNote/openNote.js:34:11
at k.$broadcast (http://192.168.254.22/opennotes/bower_components/angular/angular.min.js:114:99)
at l (http://192.168.254.22/opennotes/bower_components/angular-route/angular-route.min.js:9:497)
at k.$broadcast (http://192.168.254.22/opennotes/bower_components/angular/angular.min.js:114:99)
at g (http://192.168.254.22/opennotes/bower_components/angular/angular.min.js:88:274)
at http://192.168.254.22/opennotes/bower_components/angular/angular.min.js:91:131
at k.$eval (http://192.168.254.22/opennotes/bower_components/angular/angular.min.js:111:373)
at k.$digest (http://192.168.254.22/opennotes/bower_components/angular/angular.min.js:108:462)
at k.$apply (http://192.168.254.22/opennotes/bower_components/angular/angular.min.js:112:173)
And that's there too.
@JLiscom commented on GitHub (Sep 30, 2014):
Did you just do you install today?
Change the following line
https://github.com/FoxUSA/OpenNoteService-PHP/blob/master/Service/controller/File.php#L37
to
$url = sprintf("//%s%s%s%s",$_SERVER["SERVER_NAME"],\Config::getWebRoot() ,"service.php/file/", $model->uploadFile(self::createGUID(),$originalName, $diskName, $tokenServer->userID));@DonLafferty commented on GitHub (Sep 30, 2014):
Yes. This morning.
@JLiscom commented on GitHub (Sep 30, 2014):
@DonLafferty you should change the line above and re-upload a file
@DonLafferty commented on GitHub (Sep 30, 2014):
I did and it now works. Excellent!
@DonLafferty commented on GitHub (Sep 30, 2014):
Thanks for all the help and very timely response.
@JLiscom commented on GitHub (Sep 30, 2014):
@DonLafferty
Feel free to donate and/or star us on Docker, Alternative To, and git hub to support the project.
Enjoy