Bug Post posts do not show pictures

Source: Internet
Author: User

Bug Description:

The phenomenon is that we can not publish pictures, testing that the direction of the teacher is able to publish the normal picture (or to be grateful for the test, it is they urge us to constantly challenge the difficulties, solve, thereby improving their posture level).

  • The picture is not uploaded, the service side to help find the way to find not to upload images, service feedback: The correct posture is to upload pictures, upload pictures successfully, return an image ID, and then the interface to publish the article (Android is like this)

  • According to the service side of the feedback, find the interface to upload pictures, through the console log to find the controller, in the selection of Training courses page, click on the button to press the event-and should be the interface to publish the article, however, there is no call to upload the image of the interface (breakpoint location is wrong, you should make more breakpoints), Upload a picture method of judging conditions did not go if (item.paragraphId.length = = 0 && [item isimagetype] && item.imageAssetURL.length > 0)

  • Do not go upload method, other business direction (suffering from teaching) can upload, they go what method? and found that their judgment was a little different from ours.

  • Because the judging conditions are not met, so did not go upload method. Console, Item property is empty, see before and after model pass and no problem

  • The Createarticle controller is definitely no problem, we all use a controller

  • Break point, look at the console imageasseturl to nil--and suspect that Modle didn't pass this field

  • Suspicion is a model pass error, see where the method is called from, retrace, [publish UploadArticle:weakObject.articleModel], suspect that this articlemodel has a problem,
  • HDFSelectSchoolViewController.h choose the controller of the training course, released two model, the implementation of the document also has a model, so many model I was confused, a meal assignment, what AH
  • When we initialize the controller, we only pass Articlemodel, who changed the place? (The conclusion is that no one has changed)
  • Suspicion is that when the album was picked up without the URL, see what Changes createarticle,
  • Found they deleted some proxy method, I gave it back, run, no effect
  • I interrupted to see the teaching article when the release of the interface, we found that judging conditions than we one more
  • if (Item.paragraphId.length = = 0 && [item Isimagetype] && (item.imageAssetURL.length > 0 | | item.imagel Ocalidentifer.length > 0))

  • Look at git log found Guo Ling 6/3 modified, so I also added to judge the conditions, the code copy of the dry mausoleum, the alarm removed, according to the logic of the peak brother to modify the logic here

  • Copy the code, remove the red error, comment out the use of the notification code, not the logic, with the old logic, with the Association of Development Agent Environment, run the test, in fact, you can,
  • I always suspect that the background to the upload of the image of the interface, in fact, is not the background said that, the direction of the teaching upload pictures also did not adjust the background to the interface, but a flowref_uploadsound interface, was very depressed,
  • In fact, directly connected to the agent, test a bit better, don't be paranoid, direct measurement

Summarize:

    • Break point, find the problem point, step by step backward, do not guess, to trace, step by step, unless very certain intuition
    • The reason for this is that uploading a native image is a good way to get a teacher to write, but when we close the code at the end of the month, we close their code, and our own doesn't fix it.

Know the line of unity, more summary, don't Shagan reckless

Bug Post posts do not show pictures

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.